From 0ca6c2913acc7444f86b5256bf9a2e2cc4d70a11 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 28 Jul 2023 10:58:42 +0200 Subject: [PATCH] =?UTF-8?q?d=C3=A9placer=20le=20chargement=20de=20la=20mis?= =?UTF-8?q?e=20=C3=A0=20jour=20et=20ajoute=20le=20routage=20avec=20le=20pr?= =?UTF-8?q?ofil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/core/core.php b/core/core.php index 83e9c6f3..9ccbb992 100644 --- a/core/core.php +++ b/core/core.php @@ -342,8 +342,6 @@ class common } } } - // Mise à jour des données core - include('core/include/update.inc.php'); // Récupère un utilisateur connecté if ($this->user === []) { @@ -425,6 +423,9 @@ class common stream_context_set_default($context); } + // Mise à jour des données core + // include('core/include/update.inc.php'); + } @@ -700,7 +701,10 @@ class common // Ignore les pages dont l'utilisateur n'a pas accès and ($this->getData(['page', $pageId, 'group']) === self::GROUP_VISITOR or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') - and $this->getUser('group') >= $this->getData(['page', $pageId, 'group']) + //and $this->getUser('group') >= $this->getData(['page', $pageId, 'group']) + // Modification qui tient compte du profil de la page + and ($this->getUser('group') * 10 + $this->getUser('profil')) >= ($this->getData(['page', $pageId, 'group']) * 10 + $this->getData(['page', $pageId, 'profil'])) + ) ) ) { @@ -724,8 +728,13 @@ class common and $this->getData(['page', $parentId, 'group']) === self::GROUP_VISITOR ) or ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') - and $this->getUser('group') >= $this->getData(['page', $parentId, 'group']) - and $this->getUser('group') >= $this->getData(['page', $pageId, 'group']) + //and $this->getUser('group') >= $this->getData(['page', $parentId, 'group']) + //and $this->getUser('group') >= $this->getData(['page', $pageId, 'group']) + + // Modification qui tient compte du profil de la page + and ($this->getUser('group') * 10 + $this->getUser('profil')) >= ($this->getData(['page', $this->$parentId, 'group']) * 10 + $this->getData(['page', $this->$parentId, 'profil'])) + and ($this->getUser('group') * 10 + $this->getUser('profil')) >= ($this->getData(['page', $this->$pageId, 'group']) * 10 + $this->getData(['page', $pageId, 'profil'])) + ) ) ) {