déplacer le chargement de la mise à jour et ajoute le routage avec le profil

This commit is contained in:
Fred Tempez 2023-07-28 10:58:42 +02:00
parent 840b962d55
commit 0ca6c2913a
1 changed files with 14 additions and 5 deletions

View File

@ -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']))
)
)
) {