From 999b5dc4839aaf080029ff1827afa76d2ee85108 Mon Sep 17 00:00:00 2001
From: Thibault Dockx <thibault.dockx@fusiondirectory.org>
Date: Thu, 13 Apr 2023 20:00:39 +0100
Subject: [PATCH] :sparkles: Feat(Snapshot) - snapshots sources via webservice
 only.

Set the availibility of data source only by web services.
---
 include/management/snapshot/class_SnapshotCreateDialog.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/management/snapshot/class_SnapshotCreateDialog.inc b/include/management/snapshot/class_SnapshotCreateDialog.inc
index 3b07182fd..b8f7d50b8 100644
--- a/include/management/snapshot/class_SnapshotCreateDialog.inc
+++ b/include/management/snapshot/class_SnapshotCreateDialog.inc
@@ -57,7 +57,7 @@ class SnapshotCreateDialog extends ManagementDialog
         ]
       ],
       'dataSource' => [
-        'name'  => _('dataSource'),
+        'name'  => _('dataSource - only available via web-service.'),
         'attrs' => [
             new SelectAttribute(
               'Data source', _('Origin / Source of the data'),
@@ -74,6 +74,7 @@ class SnapshotCreateDialog extends ManagementDialog
     // The attribut will be passed to parent for later saving, dataSource might require same logic.
     $this->attributesAccess['description']->setInLdap(FALSE);
     $this->attributesAccess['snapshotSource']->setInLdap(FALSE);
+    $this->attributesAccess['snapshotSource']->setVisible(FALSE);
 
     $recordedDataSources = $this->getLdapRecordedDataSources();
     if (!empty($recordedDataSources)) {
-- 
GitLab