1.6.00 Esapces : Add profil

This commit is contained in:
Fred Tempez 2024-02-14 08:16:46 +01:00
parent 3b5ddb5a3f
commit 8e9c356188
2 changed files with 87 additions and 0 deletions

View File

@ -888,6 +888,41 @@ class user extends common
],
'user' => [
'edit' => $this->getInput('profilAddUserEdit', helper::FILTER_BOOLEAN),
],
'course' => [
'tutor' => $this->getInput('profilAddCourseTutor', helper::FILTER_BOOLEAN),
'index' => $this->getInput('profilAddCourseUsers', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUserHistory', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUserExport', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUserAdd', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUsersAdd', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUserDelete', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUsersDelete', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseEdit', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseBackup', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseRestore', helper::FILTER_BOOLEAN),
'manage' => $this->getInput('profilAddCourseUsers', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUserHistory', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUserExport', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUserAdd', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUsersAdd', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUserDelete', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseUsersDelete', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseEdit', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseBackup', helper::FILTER_BOOLEAN)
|| $this->getInput('profilAddCourseRestore', helper::FILTER_BOOLEAN),
// La suite
'users' => $this->getInput('profilAddCourseUsers', helper::FILTER_BOOLEAN),
'userHistory' => $this->getInput('profilAddCourseUserHistory', helper::FILTER_BOOLEAN),
'userHistoryExport' => $this->getInput('profilAddCourseUserHistoryExport', helper::FILTER_BOOLEAN),
'userAdd' => $this->getInput('profilAddCourseUserAdd', helper::FILTER_BOOLEAN),
'usersAdd' => $this->getInput('profilAddCourseUsersAdd', helper::FILTER_BOOLEAN),
'userDelete' => $this->getInput('profilAddCourseUserDelete', helper::FILTER_BOOLEAN),
'usersDelete' => $this->getInput('profilAddCourseUsersDelete', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddCourseEdit', helper::FILTER_BOOLEAN),
'backup' => $this->getInput('profilAddCourseBackup', helper::FILTER_BOOLEAN),
'restore' => $this->getInput('profilAddCourseRestore', helper::FILTER_BOOLEAN),
]
];

View File

@ -58,6 +58,58 @@
</div>
</div>
</div>
<?php if ($this->getUrl(2) >= self::GROUP_EDITOR): ?>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Gestion des espaces'); ?>
</h4>
<div class="row">
<div class="col6">
<?php echo template::checkbox('profilAddCourseTutor', true, 'Gestion étendue aux espaces du participant'); ?>
</div>
</div>
<div id="courseContainer">
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilAddCourseEdit', true, 'Éditer un espace'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddCourseBackup', true, 'Sauvegarder un espace'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddCourseRestore', true, 'Restaurer un espace'); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilAddCourseUsers', true, 'Voir les participants'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddCourseUserHistory', true, 'Voir historique d\'un participant'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddCourseUserHistoryExport', true, 'Exporter historique d\'un participant'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddCourseUserDelete', true, 'Désinscrire un participant'); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilAddCourseUsersAdd', true, 'Inscrire en masse'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddCourseUsersDelete', true, 'Désinscrire en masse'); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endif; ?>
<div class="row">
<div class="col12">
<div class="block">