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