diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 504aac9b..ff20b2c0 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -353,7 +353,9 @@ class init extends common "2" => [ 'name' => 'Editeur', 'readonly' => false, - 'comment' => 'Edition des pages' + 'comment' => 'Edition des pages', + 'file' => [], + 'folder' => [] ], "99" => [ 'name' => 'Administrateur', diff --git a/core/module/user/user.php b/core/module/user/user.php index bc4c028d..4e1a9831 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -443,6 +443,43 @@ class user extends common */ public function groupEdit() { + if ( + $this->getUrl(3) !== $_SESSION['csrf'] + ) { + + // Valeurs en sortie + $this->addOutput([ + 'redirect' => helper::baseUrl() . 'user', + 'notification' => helper::translate('Action interdite') + ]); + } + $group = $this->getUrl(2); + // Soumission du formulaire + if ($this->isPost()) { + $this->setData(['group', + $group, + 'file' => [ + 'download' => $this->getInput('groupEditDownload', helper::FILTER_BOOLEAN), + 'edit' => $this->getInput('groupEditEdit', helper::FILTER_BOOLEAN), + 'create' => $this->getInput('groupEditCreate', helper::FILTER_BOOLEAN), + 'rename' => $this->getInput('groupEditRename', helper::FILTER_BOOLEAN), + 'upload' => $this->getInput('groupEditUpload', helper::FILTER_BOOLEAN), + 'delete' => $this->getInput('groupEditDelete', helper::FILTER_BOOLEAN), + 'preview' => $this->getInput('groupEditPreview', helper::FILTER_BOOLEAN), + 'duplicate' => $this->getInput('groupEditDuplicate', helper::FILTER_BOOLEAN), + 'extract' => $this->getInput('groupEditExtract', helper::FILTER_BOOLEAN), + 'copycut' => $this->getInput('groupEditCopycut', helper::FILTER_BOOLEAN), + 'permission' => $this->getInput('groupEditPermission', helper::FILTER_BOOLEAN), + ], + 'folder' => [ + 'create' => $this->getInput('groupEditFolderCreate', helper::FILTER_BOOLEAN), + 'delete' => $this->getInput('groupEditFolderDelete', helper::FILTER_BOOLEAN), + 'rename' => $this->getInput('groupEditFolderRename', helper::FILTER_BOOLEAN), + 'copycut' => $this->getInput('groupEditFolderCopycut', helper::FILTER_BOOLEAN), + 'permission' => $this->getInput('groupEditFolderPermission', helper::FILTER_BOOLEAN), + ] + ]); + } // Valeurs en sortie $this->addOutput([