67 lines
1.4 KiB
PHP
67 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Définit les autorisations du plugin Autorisations étendues
|
|
*
|
|
* @plugin Autorisations étendues
|
|
* @copyright 2020
|
|
* @author tofulm
|
|
* @licence GNU/GPL
|
|
* @package SPIP\Auted\Autorisations
|
|
*/
|
|
|
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
|
return;
|
|
}
|
|
|
|
|
|
/**
|
|
* Fonction d'appel pour le pipeline
|
|
* @pipeline autoriser */
|
|
function auted_autoriser() {
|
|
}
|
|
|
|
|
|
// -----------------
|
|
// Objet aut_mods
|
|
|
|
|
|
|
|
/**
|
|
* Autorisation de créer (autmodele)
|
|
*
|
|
**/
|
|
function autoriser_autmodele_associer_dist($faire, $type, $id, $qui, $opt) {
|
|
return (autoriser('webmestre', '', '', $qui) or $qui['pgp'] === "boss");
|
|
}
|
|
|
|
/**
|
|
* Autorisation de créer (autmodele)
|
|
*
|
|
**/
|
|
function autoriser_autmodele_creer_dist($faire, $type, $id, $qui, $opt) {
|
|
return (autoriser('webmestre', '', '', $qui) or $qui['pgp'] === "boss");
|
|
}
|
|
|
|
/**
|
|
* Autorisation de voir (autmodele)
|
|
*
|
|
**/
|
|
function autoriser_autmodele_voir_dist($faire, $type, $id, $qui, $opt) {
|
|
return (autoriser('webmestre', '', '', $qui) or $qui['pgp'] === "boss");
|
|
}
|
|
|
|
/**
|
|
* Autorisation de modifier (autmodele)
|
|
*
|
|
**/
|
|
function autoriser_autmodele_modifier_dist($faire, $type, $id, $qui, $opt) {
|
|
return (autoriser('webmestre', '', '', $qui) or $qui['pgp'] === "boss");
|
|
}
|
|
|
|
/**
|
|
* Autorisation de supprimer (autmodele)
|
|
*
|
|
**/
|
|
function autoriser_autmodele_supprimer_dist($faire, $type, $id, $qui, $opt) {
|
|
return (autoriser('webmestre', '', '', $qui) or $qui['pgp'] === "boss");
|
|
}
|