From 9a6f7a750e493cb1ad473fe05bd9cdc16c39833e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org>
Date: Tue, 9 Feb 2021 10:25:05 +0100
Subject: [PATCH] :ambulance: fix(acl) Fix snapshot ACL checks in management
 classes

issue #6147
---
 include/management/actions/class_Action.inc | 4 ++--
 include/management/class_management.inc     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/management/actions/class_Action.inc b/include/management/actions/class_Action.inc
index 405bd43c8..706b32151 100644
--- a/include/management/actions/class_Action.inc
+++ b/include/management/actions/class_Action.inc
@@ -70,7 +70,7 @@ class Action
      * attribute:acl (ex: 'userPassword:r')
      * category/class/acl (ex: 'user/template/r')
      * category/class/attribute:acl (ex: 'user/user/userPassword:r')
-     * /class/acl (ex: '/snapshot/c')
+     * /class/acl (ex: '/SnapshotHandler/c')
      * /class/attribute:acl (ex: '/template/template_cn:w')
      * */
     foreach ($acls as $acl) {
@@ -262,7 +262,7 @@ class Action
         foreach ($types as $type) {
           $infos = objects::infos($type);
           if (!empty($acl['class'])) {
-            /* Class with empty category may be used in special cases like '/snapshot/c'*/
+            /* Class with empty category may be used in special cases like '/SnapshotHandler/c'*/
             $module = $infos['aclCategory'].'/'.$acl['class'];
           } elseif ($template) {
             $module = $infos['aclCategory'].'/template';
diff --git a/include/management/class_management.inc b/include/management/class_management.inc
index 0e62eb456..51631eb49 100644
--- a/include/management/class_management.inc
+++ b/include/management/class_management.inc
@@ -305,14 +305,14 @@ class management implements FusionDirectoryDialog
         new Action(
           'snapshot', _('Create snapshot'), 'geticon.php?context=actions&icon=snapshot&size=16',
           '1', 'createSnapshotDialog',
-          ['/snapshot/c']
+          ['/SnapshotHandler/c']
         )
       );
       $this->registerAction(
         new Action(
           'restore', _('Restore snapshot'), 'geticon.php?context=actions&icon=document-restore&size=16',
           '*', 'restoreSnapshotDialog',
-          ['w', '/snapshot/r']
+          ['w', '/SnapshotHandler/r']
         )
       );
       $this->actions['snapshot']->setSeparator(TRUE);
-- 
GitLab