Renomme les groupes
This commit is contained in:
parent
df31319e1e
commit
f4f07c2dc4
@ -345,7 +345,7 @@ class layout extends common
|
||||
}
|
||||
// Affichage de la barre de membre simple
|
||||
if (
|
||||
$this->getUser('group') >= self::GROUP_MEMBER && $this->getUser('group') < self::GROUP_ADMIN
|
||||
$this->getUser('group') >= self::GROUP_STUDENT && $this->getUser('group') < self::GROUP_ADMIN
|
||||
&& $this->getData(['theme', 'footer', 'memberBar']) === true
|
||||
) {
|
||||
$items .= '<span id="footerDisplayMemberAccount"';
|
||||
@ -506,11 +506,11 @@ class layout extends common
|
||||
}
|
||||
// Commandes pour les membres simples
|
||||
if (
|
||||
$this->getUser('group') >= self::GROUP_MEMBER && $this->getUser('group') < self::GROUP_ADMIN
|
||||
$this->getUser('group') >= self::GROUP_STUDENT && $this->getUser('group') < self::GROUP_ADMIN
|
||||
&& $this->getData(['theme', 'menu', 'memberBar']) === true
|
||||
) {
|
||||
if (
|
||||
$this->getUser('group') >= self::GROUP_MEMBER &&
|
||||
$this->getUser('group') >= self::GROUP_STUDENT &&
|
||||
$this->getUser('permission', 'filemanager') === true
|
||||
) {
|
||||
$itemsRight .= '<li>' . template::ico('folder', [
|
||||
@ -583,7 +583,7 @@ class layout extends common
|
||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) or ($this->getData(['page', $parentPageId, 'disable']) === true
|
||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
and $this->getUser('group') < self::GROUP_EDITOR
|
||||
and $this->getUser('group') < self::GROUP_TEACHER
|
||||
)
|
||||
) {
|
||||
$pageUrl = ($this->getData(['config', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
|
||||
@ -649,7 +649,7 @@ class layout extends common
|
||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) or ($this->getData(['page', $childKey, 'disable']) === true
|
||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
and $this->getUser('group') < self::GROUP_EDITOR
|
||||
and $this->getUser('group') < self::GROUP_TEACHER
|
||||
)
|
||||
) {
|
||||
$pageUrl = ($this->getData(['config', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
|
||||
@ -906,7 +906,7 @@ class layout extends common
|
||||
// Items de gauche
|
||||
$leftItems = '';
|
||||
// Sélecteur de langues
|
||||
if ($this->getUser('group') >= self::GROUP_EDITOR) {
|
||||
if ($this->getUser('group') >= self::GROUP_TEACHER) {
|
||||
$c = 0;
|
||||
$leftItem = '';
|
||||
foreach (self::$languages as $key => $value) {
|
||||
@ -923,7 +923,7 @@ class layout extends common
|
||||
}
|
||||
}
|
||||
// Liste des pages
|
||||
if ($this->getUser('group') >= self::GROUP_EDITOR) {
|
||||
if ($this->getUser('group') >= self::GROUP_TEACHER) {
|
||||
$leftItems .= '<li><select id="barSelectPage">';
|
||||
$leftItems .= '<option value="">' . helper::translate('Pages du site') . '</option>';
|
||||
$leftItems .= '<optgroup label="' . helper::translate('Pages orphelines') . '">';
|
||||
@ -1036,7 +1036,7 @@ class layout extends common
|
||||
// Items de droite
|
||||
$rightItems = '';
|
||||
if (
|
||||
$this->getUser('group') >= self::GROUP_EDITOR
|
||||
$this->getUser('group') >= self::GROUP_TEACHER
|
||||
&& $this->getUser(
|
||||
'permission',
|
||||
'filemanager'
|
||||
@ -1096,7 +1096,7 @@ class layout extends common
|
||||
}
|
||||
}
|
||||
if (
|
||||
$this->getUser('group') >= self::GROUP_EDITOR
|
||||
$this->getUser('group') >= self::GROUP_TEACHER
|
||||
&& $this->getUser('permission', 'user', 'edit')
|
||||
|
||||
) {
|
||||
@ -1183,7 +1183,7 @@ class layout extends common
|
||||
$vars .= 'var baseUrlQs = ' . json_encode(helper::baseUrl()) . ';';
|
||||
if (
|
||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
and $this->getUser('group') >= self::GROUP_EDITOR
|
||||
and $this->getUser('group') >= self::GROUP_TEACHER
|
||||
) {
|
||||
$vars .= 'var privateKey = ' . json_encode(md5_file(self::DATA_DIR . 'core.json')) . ';';
|
||||
}
|
||||
|
@ -546,7 +546,7 @@ class core extends common
|
||||
and $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
|
||||
) or ($this->getData(['page', $this->getUrl(0), 'disable']) === true
|
||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
and $this->getUser('group') < self::GROUP_EDITOR
|
||||
and $this->getUser('group') < self::GROUP_TEACHER
|
||||
)
|
||||
) {
|
||||
$access = false;
|
||||
|
@ -142,25 +142,25 @@ class common
|
||||
public static $groups = [
|
||||
self::GROUP_BANNED => 'Banni',
|
||||
self::GROUP_VISITOR => 'Visiteur',
|
||||
self::GROUP_MEMBER => 'Membre',
|
||||
self::GROUP_EDITOR => 'Éditeur',
|
||||
self::GROUP_STUDENT => 'Etudiant',
|
||||
self::GROUP_TEACHER => 'Enseignant',
|
||||
self::GROUP_ADMIN => 'Administrateur'
|
||||
];
|
||||
public static $groupEdits = [
|
||||
self::GROUP_BANNED => 'Banni',
|
||||
self::GROUP_MEMBER => 'Membre',
|
||||
self::GROUP_EDITOR => 'Éditeur',
|
||||
self::GROUP_STUDENT => 'Etudiant',
|
||||
self::GROUP_TEACHER => 'Enseignant',
|
||||
self::GROUP_ADMIN => 'Administrateur'
|
||||
];
|
||||
public static $groupNews = [
|
||||
self::GROUP_MEMBER => 'Membre',
|
||||
self::GROUP_EDITOR => 'Éditeur',
|
||||
self::GROUP_STUDENT => 'Etudiant',
|
||||
self::GROUP_TEACHER => 'Enseignant',
|
||||
self::GROUP_ADMIN => 'Administrateur'
|
||||
];
|
||||
public static $groupPublics = [
|
||||
self::GROUP_VISITOR => 'Visiteur',
|
||||
self::GROUP_MEMBER => 'Membre',
|
||||
self::GROUP_EDITOR => 'Éditeur',
|
||||
self::GROUP_STUDENT => 'Etudiant',
|
||||
self::GROUP_TEACHER => 'Enseignant',
|
||||
self::GROUP_ADMIN => 'Administrateur'
|
||||
];
|
||||
|
||||
@ -170,7 +170,7 @@ class common
|
||||
// Langue de l'interface sélectionnée
|
||||
public static $i18nUI = 'fr_FR';
|
||||
// Langues de contenu
|
||||
public static $classesContent = 'fr_FR';
|
||||
public static $classesContent = '';
|
||||
public static $languages = [
|
||||
'az_AZ' => 'Azərbaycan dili',
|
||||
'bg_BG' => 'български език',
|
||||
|
@ -32,7 +32,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- Barre d'administration -->
|
||||
<?php if ($this->getUser('group') > self::GROUP_MEMBER) : ?>
|
||||
<?php if ($this->getUser('group') > self::GROUP_STUDENT) : ?>
|
||||
<?php $layout->showBar(); ?>
|
||||
<?php endif; ?>
|
||||
<!-- Notifications -->
|
||||
@ -45,7 +45,7 @@
|
||||
$this->getData(['theme', 'menu', 'position']) === 'top'
|
||||
and $this->getData(['theme', 'menu', 'fixed']) === true
|
||||
and $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
and $this->getUser('group') > self::GROUP_MEMBER
|
||||
and $this->getUser('group') > self::GROUP_STUDENT
|
||||
) {
|
||||
echo '<nav id="navfixedconnected" >';
|
||||
} else {
|
||||
|
@ -740,7 +740,7 @@ class init extends common
|
||||
'parentPageId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 2,
|
||||
'group' => self::GROUP_MEMBER,
|
||||
'group' => self::GROUP_STUDENT,
|
||||
'profil' => 1,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Page privée',
|
||||
|
@ -18,12 +18,12 @@ class page extends common
|
||||
{
|
||||
|
||||
public static $actions = [
|
||||
'add' => self::GROUP_EDITOR,
|
||||
'delete' => self::GROUP_EDITOR,
|
||||
'edit' => self::GROUP_EDITOR,
|
||||
'duplicate' => self::GROUP_EDITOR,
|
||||
'jsEditor' => self::GROUP_EDITOR,
|
||||
'cssEditor' => self::GROUP_EDITOR
|
||||
'add' => self::GROUP_TEACHER,
|
||||
'delete' => self::GROUP_TEACHER,
|
||||
'edit' => self::GROUP_TEACHER,
|
||||
'duplicate' => self::GROUP_TEACHER,
|
||||
'jsEditor' => self::GROUP_TEACHER,
|
||||
'cssEditor' => self::GROUP_TEACHER
|
||||
];
|
||||
public static $pagesNoParentId = [
|
||||
'' => 'Aucune'
|
||||
@ -564,7 +564,7 @@ class page extends common
|
||||
// Profils installés
|
||||
// Profils disponibles
|
||||
foreach ($this->getData(['profil']) as $profilId => $profilData) {
|
||||
if ($profilId < self::GROUP_MEMBER) {
|
||||
if ($profilId < self::GROUP_STUDENT) {
|
||||
continue;
|
||||
}
|
||||
if ($profilId === self::GROUP_ADMIN) {
|
||||
|
@ -389,16 +389,16 @@
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="pageEditGroupProfil displayNone"
|
||||
id="pageEditGroupProfil<?php echo self::GROUP_MEMBER; ?>">
|
||||
<?php echo template::select('pageEditProfil' . self::GROUP_MEMBER, $module::$userProfils[self::GROUP_MEMBER], [
|
||||
id="pageEditGroupProfil<?php echo self::GROUP_STUDENT; ?>">
|
||||
<?php echo template::select('pageEditProfil' . self::GROUP_STUDENT, $module::$userProfils[self::GROUP_STUDENT], [
|
||||
'label' => 'Profil minimal pour accéder à la page',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'profil']),
|
||||
'help' => 'Les profils de niveau supérieur accèdent à la page.',
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="pageEditGroupProfil displayNone"
|
||||
id="pageEditGroupProfil<?php echo self::GROUP_EDITOR; ?>">
|
||||
<?php echo template::select('pageEditProfil' . self::GROUP_EDITOR, $module::$userProfils[self::GROUP_EDITOR], [
|
||||
id="pageEditGroupProfil<?php echo self::GROUP_TEACHER; ?>">
|
||||
<?php echo template::select('pageEditProfil' . self::GROUP_TEACHER, $module::$userProfils[self::GROUP_TEACHER], [
|
||||
'label' => 'Profil minimal pour accéder à la page',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'profil']),
|
||||
'help' => 'Les profils de niveau supérieur accèdent à la page.',
|
||||
|
@ -22,8 +22,8 @@ class user extends common
|
||||
'import' => self::GROUP_ADMIN,
|
||||
'index' => self::GROUP_ADMIN,
|
||||
'template' => self::GROUP_ADMIN,
|
||||
'edit' => self::GROUP_MEMBER,
|
||||
'logout' => self::GROUP_MEMBER,
|
||||
'edit' => self::GROUP_STUDENT,
|
||||
'logout' => self::GROUP_STUDENT,
|
||||
'forgot' => self::GROUP_VISITOR,
|
||||
'login' => self::GROUP_VISITOR,
|
||||
'reset' => self::GROUP_VISITOR,
|
||||
@ -65,8 +65,8 @@ class user extends common
|
||||
];
|
||||
|
||||
public static $groupProfils = [
|
||||
self::GROUP_MEMBER => 'Membre',
|
||||
self::GROUP_EDITOR => 'Éditeur'
|
||||
self::GROUP_STUDENT => 'Membre',
|
||||
self::GROUP_TEACHER => 'Éditeur'
|
||||
];
|
||||
|
||||
public static $listModules = [];
|
||||
@ -162,7 +162,7 @@ class user extends common
|
||||
|
||||
// Profils disponibles
|
||||
foreach ($this->getData(['profil']) as $profilId => $profilData) {
|
||||
if ($profilId < self::GROUP_MEMBER) {
|
||||
if ($profilId < self::GROUP_STUDENT) {
|
||||
continue;
|
||||
}
|
||||
if ($profilId === self::GROUP_ADMIN) {
|
||||
@ -195,7 +195,7 @@ class user extends common
|
||||
// L'utilisateur n'existe pas
|
||||
$this->getData(['user', $this->getUrl(2)]) === null
|
||||
// Groupe insuffisant
|
||||
and ($this->getUrl('group') < self::GROUP_EDITOR)
|
||||
and ($this->getUrl('group') < self::GROUP_TEACHER)
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -255,7 +255,7 @@ class user extends common
|
||||
and $this->getUrl('group') <= self::GROUP_VISITOR
|
||||
)
|
||||
// Impossible d'éditer un autre utilisateur
|
||||
or ($this->getUrl('group') < self::GROUP_EDITOR)
|
||||
or ($this->getUrl('group') < self::GROUP_TEACHER)
|
||||
)
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
@ -364,7 +364,7 @@ class user extends common
|
||||
|
||||
// Profils disponibles
|
||||
foreach ($this->getData(['profil']) as $profilId => $profilData) {
|
||||
if ($profilId < self::GROUP_MEMBER) {
|
||||
if ($profilId < self::GROUP_STUDENT) {
|
||||
continue;
|
||||
}
|
||||
if ($profilId === self::GROUP_ADMIN) {
|
||||
@ -503,8 +503,8 @@ class user extends common
|
||||
])
|
||||
];
|
||||
} elseif (
|
||||
$groupId == self::GROUP_MEMBER ||
|
||||
$groupId == self::GROUP_EDITOR
|
||||
$groupId == self::GROUP_STUDENT ||
|
||||
$groupId == self::GROUP_TEACHER
|
||||
) {
|
||||
// Enumérer les sous groupes MEMBER et MODERATOR
|
||||
foreach ($groupData as $profilId => $profilData) {
|
||||
@ -882,7 +882,7 @@ class user extends common
|
||||
($this->getData(['user', $userId, 'connectTimeout']) + $this->getData(['config', 'connect', 'timeout'])) < time()
|
||||
and $this->getData(['user', $userId, 'connectFail']) < $this->getData(['config', 'connect', 'attempt'])
|
||||
and password_verify(html_entity_decode($this->getInput('userLoginPassword', helper::FILTER_STRING_SHORT, true)), $this->getData(['user', $userId, 'password']))
|
||||
and $this->getData(['user', $userId, 'group']) >= self::GROUP_MEMBER
|
||||
and $this->getData(['user', $userId, 'group']) >= self::GROUP_STUDENT
|
||||
and $captcha === true
|
||||
) {
|
||||
// RAZ
|
||||
|
@ -91,34 +91,34 @@
|
||||
<div class="col6">
|
||||
<?php echo template::select('userAddGroup', self::$groupNews, [
|
||||
'label' => 'Groupe',
|
||||
'selected' => self::GROUP_MEMBER
|
||||
'selected' => self::GROUP_STUDENT
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="userAddGroupProfil displayNone"
|
||||
id="userAddGroupProfil<?php echo self::GROUP_MEMBER; ?>">
|
||||
<?php echo template::select('userAddProfil' . self::GROUP_MEMBER, $module::$userProfils[self::GROUP_MEMBER], [
|
||||
id="userAddGroupProfil<?php echo self::GROUP_STUDENT; ?>">
|
||||
<?php echo template::select('userAddProfil' . self::GROUP_STUDENT, $module::$userProfils[self::GROUP_STUDENT], [
|
||||
'label' => 'Profil',
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="userAddGroupProfil displayNone"
|
||||
id="userAddGroupProfil<?php echo self::GROUP_EDITOR; ?>">
|
||||
<?php echo template::select('userAddProfil' . self::GROUP_EDITOR, $module::$userProfils[self::GROUP_EDITOR], [
|
||||
id="userAddGroupProfil<?php echo self::GROUP_TEACHER; ?>">
|
||||
<?php echo template::select('userAddProfil' . self::GROUP_TEACHER, $module::$userProfils[self::GROUP_TEACHER], [
|
||||
'label' => 'Profil',
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="userCommentProfil<?php echo self::GROUP_MEMBER; ?>" class="col12 displayNone userCommentProfil">
|
||||
<?php echo template::textarea('useraddProfilComment' . self::GROUP_MEMBER, [
|
||||
"value" => implode("\n",$module::$userProfilsComments[self::GROUP_MEMBER])
|
||||
<div id="userCommentProfil<?php echo self::GROUP_STUDENT; ?>" class="col12 displayNone userCommentProfil">
|
||||
<?php echo template::textarea('useraddProfilComment' . self::GROUP_STUDENT, [
|
||||
"value" => implode("\n",$module::$userProfilsComments[self::GROUP_STUDENT])
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
<div id="userCommentProfil<?php echo self::GROUP_EDITOR; ?>" class="col12 displayNone userCommentProfil">
|
||||
<?php echo template::textarea('useraddProfilComment2' . self::GROUP_EDITOR, [
|
||||
"value" => implode("\n",$module::$userProfilsComments[self::GROUP_EDITOR])
|
||||
<div id="userCommentProfil<?php echo self::GROUP_TEACHER; ?>" class="col12 displayNone userCommentProfil">
|
||||
<?php echo template::textarea('useraddProfilComment2' . self::GROUP_TEACHER, [
|
||||
"value" => implode("\n",$module::$userProfilsComments[self::GROUP_TEACHER])
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<div class="col6">
|
||||
<?php echo template::text('userEditFirstname', [
|
||||
'autocomplete' => 'off',
|
||||
'disabled' => $this->getUser('group') > self::GROUP_EDITOR ? false : true,
|
||||
'disabled' => $this->getUser('group') > self::GROUP_TEACHER ? false : true,
|
||||
'label' => 'Prénom',
|
||||
'value' => $this->getData(['user', $this->getUrl(2), 'firstname'])
|
||||
]); ?>
|
||||
@ -37,7 +37,7 @@
|
||||
<div class="col6">
|
||||
<?php echo template::text('userEditLastname', [
|
||||
'autocomplete' => 'off',
|
||||
'disabled' => $this->getUser('group') > self::GROUP_EDITOR ? false : true,
|
||||
'disabled' => $this->getUser('group') > self::GROUP_TEACHER ? false : true,
|
||||
'label' => 'Nom',
|
||||
'value' => $this->getData(['user', $this->getUrl(2), 'lastname'])
|
||||
]); ?>
|
||||
@ -116,16 +116,16 @@
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="userEditGroupProfil displayNone"
|
||||
id="userEditGroupProfil<?php echo self::GROUP_MEMBER; ?>">
|
||||
<?php echo template::select('userEditProfil' . self::GROUP_MEMBER, $module::$userProfils[self::GROUP_MEMBER], [
|
||||
id="userEditGroupProfil<?php echo self::GROUP_STUDENT; ?>">
|
||||
<?php echo template::select('userEditProfil' . self::GROUP_STUDENT, $module::$userProfils[self::GROUP_STUDENT], [
|
||||
'label' => 'Profil',
|
||||
'selected' => $this->getData(['user', $this->getUrl(2), 'profil']),
|
||||
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="userEditGroupProfil displayNone"
|
||||
id="userEditGroupProfil<?php echo self::GROUP_EDITOR; ?>">
|
||||
<?php echo template::select('userEditProfil' . self::GROUP_EDITOR, $module::$userProfils[self::GROUP_EDITOR], [
|
||||
id="userEditGroupProfil<?php echo self::GROUP_TEACHER; ?>">
|
||||
<?php echo template::select('userEditProfil' . self::GROUP_TEACHER, $module::$userProfils[self::GROUP_TEACHER], [
|
||||
'label' => 'Profil',
|
||||
'selected' => $this->getData(['user', $this->getUrl(2), 'profil']),
|
||||
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
|
||||
@ -135,18 +135,18 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div id="userCommentProfil<?php echo self::GROUP_MEMBER; ?>"
|
||||
<div id="userCommentProfil<?php echo self::GROUP_STUDENT; ?>"
|
||||
class="col12 userCommentProfil">
|
||||
<?php echo template::textarea('userEditProfilComment' . self::GROUP_MEMBER, [
|
||||
"value" => implode("\n", $module::$userProfilsComments[self::GROUP_MEMBER]),
|
||||
<?php echo template::textarea('userEditProfilComment' . self::GROUP_STUDENT, [
|
||||
"value" => implode("\n", $module::$userProfilsComments[self::GROUP_STUDENT]),
|
||||
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
<div id="userCommentProfil<?php echo self::GROUP_EDITOR; ?>"
|
||||
<div id="userCommentProfil<?php echo self::GROUP_TEACHER; ?>"
|
||||
class="col12 userCommentProfil">
|
||||
<?php echo template::textarea('userEditProfilComment' . self::GROUP_EDITOR, [
|
||||
"value" => implode("\n", $module::$userProfilsComments[self::GROUP_EDITOR]),
|
||||
<?php echo template::textarea('userEditProfilComment' . self::GROUP_TEACHER, [
|
||||
"value" => implode("\n", $module::$userProfilsComments[self::GROUP_TEACHER]),
|
||||
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
|
||||
]);
|
||||
?>
|
||||
|
@ -63,7 +63,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($this->getUrl(2) >= self::GROUP_EDITOR): ?>
|
||||
<?php if ($this->getUrl(2) >= self::GROUP_TEACHER): ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
|
@ -27,15 +27,15 @@ class blog extends common
|
||||
const EDIT_ALL = 'all';
|
||||
|
||||
public static $actions = [
|
||||
'add' => self::GROUP_EDITOR,
|
||||
'comment' => self::GROUP_EDITOR,
|
||||
'commentApprove' => self::GROUP_EDITOR,
|
||||
'commentDelete' => self::GROUP_EDITOR,
|
||||
'commentDeleteAll' => self::GROUP_EDITOR,
|
||||
'config' => self::GROUP_EDITOR,
|
||||
'option' => self::GROUP_EDITOR,
|
||||
'delete' => self::GROUP_EDITOR,
|
||||
'edit' => self::GROUP_EDITOR,
|
||||
'add' => self::GROUP_TEACHER,
|
||||
'comment' => self::GROUP_TEACHER,
|
||||
'commentApprove' => self::GROUP_TEACHER,
|
||||
'commentDelete' => self::GROUP_TEACHER,
|
||||
'commentDeleteAll' => self::GROUP_TEACHER,
|
||||
'config' => self::GROUP_TEACHER,
|
||||
'option' => self::GROUP_TEACHER,
|
||||
'delete' => self::GROUP_TEACHER,
|
||||
'edit' => self::GROUP_TEACHER,
|
||||
'index' => self::GROUP_VISITOR,
|
||||
'rss' => self::GROUP_VISITOR
|
||||
];
|
||||
@ -697,7 +697,7 @@ class blog extends common
|
||||
ksort(self::$users);
|
||||
foreach (self::$users as $userId => &$userFirstname) {
|
||||
// Les membres ne sont pas éditeurs, les exclure de la liste
|
||||
if ($this->getData(['user', $userId, 'group']) < self::GROUP_EDITOR) {
|
||||
if ($this->getData(['user', $userId, 'group']) < self::GROUP_TEACHER) {
|
||||
unset(self::$users[$userId]);
|
||||
}
|
||||
$userFirstname = $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']) . ' (' . self::$groupEdits[$this->getData(['user', $userId, 'group'])] . ')';
|
||||
|
@ -29,7 +29,7 @@
|
||||
or (
|
||||
// Groupe
|
||||
($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_ADMIN
|
||||
or $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_EDITOR)
|
||||
or $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_TEACHER)
|
||||
and $this->getUser('group') >= $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent'])
|
||||
)
|
||||
or (
|
||||
|
@ -62,7 +62,7 @@
|
||||
or (
|
||||
// Groupe
|
||||
($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === self::GROUP_ADMIN
|
||||
or $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === self::GROUP_EDITOR)
|
||||
or $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === self::GROUP_TEACHER)
|
||||
and $this->getUser('group') >= $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent'])
|
||||
)
|
||||
or (
|
||||
|
@ -22,13 +22,13 @@ class form extends common
|
||||
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)
|
||||
|
||||
public static $actions = [
|
||||
'config' => self::GROUP_EDITOR,
|
||||
'option' => self::GROUP_EDITOR,
|
||||
'data' => self::GROUP_EDITOR,
|
||||
'delete' => self::GROUP_EDITOR,
|
||||
'deleteall' => self::GROUP_EDITOR,
|
||||
'config' => self::GROUP_TEACHER,
|
||||
'option' => self::GROUP_TEACHER,
|
||||
'data' => self::GROUP_TEACHER,
|
||||
'delete' => self::GROUP_TEACHER,
|
||||
'deleteall' => self::GROUP_TEACHER,
|
||||
'index' => self::GROUP_VISITOR,
|
||||
'export2csv' => self::GROUP_EDITOR,
|
||||
'export2csv' => self::GROUP_TEACHER,
|
||||
];
|
||||
|
||||
public static $data = [];
|
||||
|
@ -44,15 +44,15 @@ class gallery extends common
|
||||
public static $config = [];
|
||||
|
||||
public static $actions = [
|
||||
'config' => self::GROUP_EDITOR,
|
||||
'delete' => self::GROUP_EDITOR,
|
||||
'dirs' => self::GROUP_EDITOR,
|
||||
'sortGalleries' => self::GROUP_EDITOR,
|
||||
'sortPictures' => self::GROUP_EDITOR,
|
||||
'edit' => self::GROUP_EDITOR,
|
||||
'add' => self::GROUP_EDITOR,
|
||||
'theme' => self::GROUP_EDITOR,
|
||||
'option' => self::GROUP_EDITOR,
|
||||
'config' => self::GROUP_TEACHER,
|
||||
'delete' => self::GROUP_TEACHER,
|
||||
'dirs' => self::GROUP_TEACHER,
|
||||
'sortGalleries' => self::GROUP_TEACHER,
|
||||
'sortPictures' => self::GROUP_TEACHER,
|
||||
'edit' => self::GROUP_TEACHER,
|
||||
'add' => self::GROUP_TEACHER,
|
||||
'theme' => self::GROUP_TEACHER,
|
||||
'option' => self::GROUP_TEACHER,
|
||||
'index' => self::GROUP_VISITOR
|
||||
];
|
||||
|
||||
|
@ -21,13 +21,13 @@ class news extends common
|
||||
const DATADIRECTORY = self::DATA_DIR . 'news/';
|
||||
|
||||
public static $actions = [
|
||||
'add' => self::GROUP_EDITOR,
|
||||
'config' => self::GROUP_EDITOR,
|
||||
'add' => self::GROUP_TEACHER,
|
||||
'config' => self::GROUP_TEACHER,
|
||||
// Edition des news
|
||||
'option' => self::GROUP_EDITOR,
|
||||
'option' => self::GROUP_TEACHER,
|
||||
// paramétrage des news
|
||||
'delete' => self::GROUP_EDITOR,
|
||||
'edit' => self::GROUP_EDITOR,
|
||||
'delete' => self::GROUP_TEACHER,
|
||||
'edit' => self::GROUP_TEACHER,
|
||||
'index' => self::GROUP_VISITOR,
|
||||
'rss' => self::GROUP_VISITOR
|
||||
];
|
||||
|
@ -21,7 +21,7 @@ class redirection extends common
|
||||
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)
|
||||
|
||||
public static $actions = [
|
||||
'config' => self::GROUP_EDITOR,
|
||||
'config' => self::GROUP_TEACHER,
|
||||
'index' => self::GROUP_VISITOR
|
||||
];
|
||||
|
||||
@ -59,7 +59,7 @@ class redirection extends common
|
||||
// Message si l'utilisateur peut éditer la page
|
||||
if (
|
||||
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
|
||||
&& $this->getUser('group') >= self::GROUP_EDITOR
|
||||
&& $this->getUser('group') >= self::GROUP_TEACHER
|
||||
&& $this->getUrl(1) !== 'force'
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
|
@ -26,7 +26,7 @@ class search extends common
|
||||
|
||||
public static $actions = [
|
||||
'index' => self::GROUP_VISITOR,
|
||||
'config' => self::GROUP_EDITOR
|
||||
'config' => self::GROUP_TEACHER
|
||||
];
|
||||
|
||||
// Variables pour l'affichage des résultats
|
||||
|
Loading…
Reference in New Issue
Block a user