54 lines
1.1 KiB
PHP
54 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* Définit les autorisations du plugin GamuForm
|
|
*
|
|
* @plugin GamuForm
|
|
* @copyright 2020
|
|
* @author tofulm
|
|
* @licence GNU/GPL
|
|
* @package SPIP\Gamuform\Autorisations
|
|
*/
|
|
|
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
|
return;
|
|
}
|
|
|
|
|
|
/**
|
|
* Fonction d'appel pour le pipeline
|
|
* @pipeline autoriser */
|
|
function gamuform_autoriser() {
|
|
}
|
|
|
|
function autoriser_gamuform_modifier_dist($faire, $type, $id, $qui, $opt) {
|
|
if (!empty($opt['objet'])) {
|
|
return autoriser('modifier', $opt['objet'], $id, $qui, []);
|
|
}
|
|
|
|
return autoriser('webmestre');
|
|
}
|
|
|
|
|
|
function autoriser_gamuform_voir_dist($faire, $type, $id, $qui, $opt) {
|
|
if (!empty($opt['objet'])) {
|
|
return autoriser('voir', $opt['objet'], $id, $qui, []);
|
|
}
|
|
|
|
return autoriser('webmestre');
|
|
}
|
|
|
|
function autoriser_gamuform_creer_dist($faire, $type, $id, $qui, $opt) {
|
|
if (!empty($opt['objet'])) {
|
|
return autoriser('creer', $opt['objet'], $id, $qui, []);
|
|
}
|
|
|
|
return autoriser('webmestre');
|
|
}
|
|
|
|
function autoriser_gamuform_supprimer_dist($faire, $type, $id, $qui, $opt) {
|
|
if (!empty($opt['objet'])) {
|
|
return autoriser('voir', $opt['objet'], $id, $qui, []);
|
|
}
|
|
|
|
return autoriser('webmestre');
|
|
}
|