From 4b51a2666921e3d58e23981a681cd14b66d65f2c Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Fri, 22 Sep 2023 15:02:32 +0200 Subject: [PATCH] Zwii 13003 --- module/blog/blog.php | 23 +++++++++++------------ module/blog/changes.md | 2 ++ module/blog/enum.json | 2 +- module/form/changes.md | 2 ++ module/form/enum.json | 2 +- module/form/form.php | 15 +++++++-------- 6 files changed, 24 insertions(+), 22 deletions(-) diff --git a/module/blog/blog.php b/module/blog/blog.php index 639d1f2..1bf734a 100644 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -16,7 +16,7 @@ class blog extends common { - const VERSION = '7.0'; + const VERSION = '7.1'; const REALNAME = 'Blog'; const DELETE = true; const UPDATE = '0.0'; @@ -27,15 +27,15 @@ class blog extends common const EDIT_ALL = 'all'; public static $actions = [ - 'add' => self::GROUP_TEACHER, - 'comment' => self::GROUP_TEACHER, - 'commentApprove' => self::GROUP_TEACHER, - 'commentDelete' => self::GROUP_TEACHER, - 'commentDeleteAll' => self::GROUP_TEACHER, - 'config' => self::GROUP_TEACHER, - 'option' => self::GROUP_TEACHER, - 'delete' => self::GROUP_TEACHER, - 'edit' => self::GROUP_TEACHER, + 'add' => self::GROUP_EDITOR, + 'comment' => self::GROUP_EDITOR, + 'commentApprove' => self::GROUP_EDITOR, + 'commentDelete' => self::GROUP_EDITOR, + 'commentDeleteAll' => self::GROUP_EDITOR, + 'config' => self::GROUP_EDITOR, + 'option' => self::GROUP_EDITOR, + 'delete' => self::GROUP_EDITOR, + 'edit' => self::GROUP_EDITOR, 'index' => self::GROUP_VISITOR, 'rss' => self::GROUP_VISITOR ]; @@ -697,7 +697,7 @@ class blog extends common ksort(self::$users); foreach (self::$users as $userId => &$userFirstname) { // Les membres ne sont pas éditeurs, les exclure de la liste - if ($this->getData(['user', $userId, 'group']) < self::GROUP_TEACHER) { + if ($this->getData(['user', $userId, 'group']) < self::GROUP_EDITOR) { unset(self::$users[$userId]); } $userFirstname = $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']) . ' (' . self::$groupEdits[$this->getData(['user', $userId, 'group'])] . ')'; @@ -740,7 +740,6 @@ class blog extends common else { // Soumission du formulaire if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) === true && $this->isPost() ) { // Check la captcha diff --git a/module/blog/changes.md b/module/blog/changes.md index 6deb730..5ee383d 100644 --- a/module/blog/changes.md +++ b/module/blog/changes.md @@ -1,3 +1,5 @@ +# Version 7.1 +- Permission lors de la validation d'un formulaire # Version 7.0 - Gestion des permissions intégrée dans le module # version 6.9 diff --git a/module/blog/enum.json b/module/blog/enum.json index 09ca60b..1cd7c43 100644 --- a/module/blog/enum.json +++ b/module/blog/enum.json @@ -1 +1 @@ -{"name":"blog","realName":"Blog","version":"6.9","update":"0.0","delete":true,"dataDirectory":""} \ No newline at end of file +{"name":"blog","realName":"Blog","version":"7.1","update":"0.0","delete":true,"dataDirectory":""} \ No newline at end of file diff --git a/module/form/changes.md b/module/form/changes.md index 54954a9..2a334ed 100644 --- a/module/form/changes.md +++ b/module/form/changes.md @@ -1,3 +1,5 @@ +# Version 4.1 +- Corrige un email non envoyé après validation d'un formulaire. # Version 4.0 - Gestion des permissions intégrée dans le module. - Date au format européen. diff --git a/module/form/enum.json b/module/form/enum.json index 7f3bfc1..bdc0db8 100644 --- a/module/form/enum.json +++ b/module/form/enum.json @@ -1 +1 @@ -{"name":"form","realName":"Formulaire","version":"3.10","update":"0.0","delete":true,"dataDirectory":""} \ No newline at end of file +{"name":"form","realName":"Formulaire","version":"4.1","update":"0.0","delete":true,"dataDirectory":""} \ No newline at end of file diff --git a/module/form/form.php b/module/form/form.php index 66df2a2..c6e0238 100644 --- a/module/form/form.php +++ b/module/form/form.php @@ -17,18 +17,18 @@ class form extends common { - const VERSION = '4.0'; + const VERSION = '4.1'; const REALNAME = 'Formulaire'; const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json) public static $actions = [ - 'config' => self::GROUP_TEACHER, - 'option' => self::GROUP_TEACHER, - 'data' => self::GROUP_TEACHER, - 'delete' => self::GROUP_TEACHER, - 'deleteall' => self::GROUP_TEACHER, + 'config' => self::GROUP_EDITOR, + 'option' => self::GROUP_EDITOR, + 'data' => self::GROUP_EDITOR, + 'delete' => self::GROUP_EDITOR, + 'deleteall' => self::GROUP_EDITOR, 'index' => self::GROUP_VISITOR, - 'export2csv' => self::GROUP_TEACHER, + 'export2csv' => self::GROUP_EDITOR, ]; public static $data = []; @@ -395,7 +395,6 @@ class form extends common // Soumission du formulaire if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) === true && $this->isPost() ) { // Check la captcha