From 6ac06f669b98b10612be14c949d4888452929d7e Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 24 Jul 2023 18:22:24 +0200 Subject: [PATCH] Permission : liste de modules non fixes --- core/module/user/user.php | 13 ++++++++++ core/module/user/view/profilAdd/profilAdd.php | 24 +++++-------------- .../user/view/profilEdit/profilEdit.php | 23 ++++-------------- 3 files changed, 24 insertions(+), 36 deletions(-) diff --git a/core/module/user/user.php b/core/module/user/user.php index 68343f30..fdc39401 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -69,6 +69,8 @@ class user extends common self::GROUP_EDITOR => 'Editeur' ]; + public static $listModules = []; + /** * Ajout */ @@ -616,11 +618,16 @@ class user extends common ]); } + // Chemin vers les dossiers du gestionnaire de fichier self::$sharePath = $this->getSubdirectories('./site/file/source'); self::$sharePath = array_flip(self::$sharePath); self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath); self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath); + // Liste des modules installés + self::$listModules = helper::getModules(); + self::$listModules = array_keys(self::$listModules); + sort(self::$listModules); // Valeurs en sortie; $this->addOutput([ 'title' => sprintf(helper::translate('Édition du profil %s'), $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'name'])), @@ -712,11 +719,17 @@ class user extends common ]); } + // Chemin vers les dossiers du gestionnaire de fichier self::$sharePath = $this->getSubdirectories('./site/file/source'); self::$sharePath = array_flip(self::$sharePath); self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath); self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath); + // Liste des modules installés + self::$listModules = helper::getModules(); + self::$listModules = array_keys(self::$listModules); + sort(self::$listModules); + // Valeurs en sortie; $this->addOutput([ 'title' => "Ajouter un profil", diff --git a/core/module/user/view/profilAdd/profilAdd.php b/core/module/user/view/profilAdd/profilAdd.php index 153a8452..874d2535 100644 --- a/core/module/user/view/profilAdd/profilAdd.php +++ b/core/module/user/view/profilAdd/profilAdd.php @@ -79,24 +79,12 @@
- - - - - - + + +
diff --git a/core/module/user/view/profilEdit/profilEdit.php b/core/module/user/view/profilEdit/profilEdit.php index 12a34904..d402db58 100644 --- a/core/module/user/view/profilEdit/profilEdit.php +++ b/core/module/user/view/profilEdit/profilEdit.php @@ -101,24 +101,11 @@
- - - - - - + + +