permission accordée à l'autorité

This commit is contained in:
Fred Tempez 2020-10-12 19:27:53 +02:00
parent 6477265a8a
commit 63f1c6844f
2 changed files with 11 additions and 4 deletions

View File

@ -306,8 +306,12 @@ class blog extends common {
foreach ($articleIds as $key => $value) {
if (
( // Propriétaire
$this->getData(['module', $this->getUrl(0), $value,'editConsent']) === self::EDIT_OWNER
AND $this->getData(['module', $this->getUrl(0), $value,'userId']) === $this->getUser('id')
(
$this->getData(['module', $this->getUrl(0), $value,'editConsent']) === self::EDIT_OWNER
AND $this->getData(['module', $this->getUrl(0), $value,'userId']) === $this->getUser('id')
) // Ou une autorité
OR $this->getUser('group') > $this->getData(['module',$this->getUrl(0), $value,'editConsent'])
) OR (
// Groupe
$this->getData(['module', $this->getUrl(0), $this->getUrl(1),'editConsent']) !== self::EDIT_OWNER

View File

@ -11,8 +11,11 @@
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND
( // Propriétaire
$this->getData(['module', $this->getUrl(0), $this->getUrl(1),'editConsent']) === $module::EDIT_OWNER
AND $this->getData(['module', $this->getUrl(0), $this->getUrl(1),'userId']) === $this->getUser('id')
(
$this->getData(['module', $this->getUrl(0), $this->getUrl(1),'editConsent']) === $module::EDIT_OWNER
AND $this->getData(['module', $this->getUrl(0), $this->getUrl(1),'userId']) === $this->getUser('id')
) // Ou une autorité
OR $this->getUser('group') > $this->getData(['module',$this->getUrl(0), $value,'editConsent'])
) OR (
// Groupe
$this->getData(['module', $this->getUrl(0), $this->getUrl(1),'editConsent']) !== $module::EDIT_OWNER