From eb28a76636e5b8f7a90f390cbc3ea6ec14b69cc1 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Fri, 6 Sep 2024 17:32:29 +0200 Subject: [PATCH] =?UTF-8?q?m=C3=A9thode=20authentification?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/class/layout.class.php | 20 ++++++++++---------- core/class/router.class.php | 16 ++++++++-------- core/core.php | 11 +++++++++-- core/layout/main.php | 2 +- core/module/user/user.php | 20 ++++++++++++++++---- module/blog/blog.php | 4 ++-- module/blog/view/article/article.php | 6 +++--- module/blog/view/index/index.php | 2 +- module/news/view/article/article.php | 2 +- module/news/view/index/index.php | 2 +- module/redirection/redirection.php | 2 +- 11 files changed, 53 insertions(+), 34 deletions(-) diff --git a/core/class/layout.class.php b/core/class/layout.class.php index 721967c7..db2d044d 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -330,7 +330,7 @@ class layout extends common // Affichage du lien de connexion if ( ($this->getData(['theme', 'footer', 'loginLink']) - and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') + and $this->isConnected() === false ) or $this->getUrl(0) === 'theme' ) { @@ -493,7 +493,7 @@ class layout extends common // Lien de connexion if ( ($this->getData(['theme', 'menu', 'loginLink']) - and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') + and $this->isConnected() === false ) or $this->getUrl(0) === 'theme' ) { @@ -580,9 +580,9 @@ class layout extends common if ( ($this->getData(['page', $parentPageId, 'disable']) === true - and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') + and $this->isConnected() === false ) or ($this->getData(['page', $parentPageId, 'disable']) === true - and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') + and $this->isConnected() === true and $this->getUser('group') < self::GROUP_EDITOR ) ) { @@ -646,9 +646,9 @@ class layout extends common $items .= '
  • '; if ( ($this->getData(['page', $childKey, 'disable']) === true - and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') + and $this->isConnected() === false ) or ($this->getData(['page', $childKey, 'disable']) === true - and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') + and $this->isConnected() === true and $this->getUser('group') < self::GROUP_EDITOR ) ) { @@ -742,7 +742,7 @@ class layout extends common $items .= '