bug de page parente avec permission
This commit is contained in:
parent
fad19249db
commit
fc502a1c64
@ -736,21 +736,21 @@ class common
|
||||
}
|
||||
// Enfants
|
||||
foreach ($pages as $pageId => $pagePosition) {
|
||||
|
||||
if (
|
||||
// Page parent
|
||||
$parentId = $this->getData(['page', $pageId, 'parentPageId'])
|
||||
// Ignore les pages dont l'utilisateur n'a pas accès
|
||||
and (
|
||||
($this->getData(['page', $pageId, 'group']) === self::GROUP_VISITOR
|
||||
and $this->getData(['page', $parentId, 'group']) === self::GROUP_VISITOR
|
||||
(
|
||||
$this->getData(['page', $pageId, 'group']) === self::GROUP_VISITOR
|
||||
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'])
|
||||
|
||||
// Modification qui tient compte du profil de la page
|
||||
and ($this->getUser('group') * self::MAX_PROFILS + $this->getUser('profil')) >= ($this->getData(['page', $this->$parentId, 'group']) * self::MAX_PROFILS + $this->getData(['page', $this->$parentId, 'profil']))
|
||||
and ($this->getUser('group') * self::MAX_PROFILS + $this->getUser('profil')) >= ($this->getData(['page', $this->$pageId, 'group']) * self::MAX_PROFILS + $this->getData(['page', $pageId, 'profil']))
|
||||
or (
|
||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
and
|
||||
$this->getUser('group') * self::MAX_PROFILS + $this->getUser('profil')) >= ($this->getData(['page', $pageId, 'group']) * self::MAX_PROFILS + $this->getData(['page', $pageId, 'profil'])
|
||||
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user