permission accordée à l'autorité

pull/10/head
Fred Tempez 2 years ago
parent 6477265a8a
commit 63f1c6844f
  1. 8
      module/blog/blog.php
  2. 7
      module/blog/view/article/article.php

@ -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

@ -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

Loading…
Cancel
Save