Revert "Permissions de l'article"

This reverts commit e24461fa2d.
This commit is contained in:
Fred Tempez 2020-10-12 18:32:55 +02:00
parent e24461fa2d
commit 80ee16aa82
4 changed files with 8 additions and 5 deletions

View File

@ -23,7 +23,7 @@ if(version_compare(PHP_VERSION, '5.6.0', '<')) {
/* Set locale to French */
date_default_timezone_set('Europe/Paris');
setlocale (LC_ALL, 'fr_FR.UTF8','fra');
setlocale (LC_TIME, 'fr_FR.utf8','fra');
/**
* Initialisation de Zwii

View File

@ -15,6 +15,7 @@
class blog extends common {
const EDIT_OWNER = 'owner';
const EDIT_GROUP = 'group';
public static $actions = [
'add' => self::GROUP_EDITOR,
@ -76,7 +77,8 @@ class blog extends common {
// Permissions d'un article
public static $articleConsent = [
self::EDIT_OWNER => 'Propriétaire'
self::EDIT_GROUP => 'Groupe du propriétaire',
self::EDIT_OWNER => 'Propiétaire'
];
@ -308,7 +310,8 @@ class blog extends common {
$consent === self::EDIT_OWNER
AND $this->getData(['module', $this->getUrl(0), $value,'userId']) === $this->getUser('id')
) OR (
$this->getUser('group') >= $this->getData(['module',$this->getUrl(0), $value,'editConsent'])
$consent === self::EDIT_GROUP
AND $this->getUser('group') >= $this->getData(['user',$this->getUser('group'),'group'])
)
) {
$filterData[] = $value;

View File

@ -87,7 +87,7 @@
]); ?>
</div>
<div class="col4">
<?php echo template::select('blogAddConsent', array_merge($module::$articleConsent, self::$groupNews) , [
<?php echo template::select('blogAddConsent', $module::$articleConsent , [
'label' => 'Edition / Suppression',
'selected' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'editConsent']),
'help' => 'Les utilisateurs des groupes supérieurs accèdent à l\'article sans restriction'

View File

@ -93,7 +93,7 @@
]); ?>
</div>
<div class="col4">
<?php echo template::select('blogEditConsent', array_merge($module::$articleConsent, self::$groupNews) , [
<?php echo template::select('blogEditConsent', $module::$articleConsent , [
'label' => 'Edition / Suppression',
'selected' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'editConsent']),
'help' => 'Les utilisateurs des groupes supérieurs accèdent à l\'article sans restriction'