Ménage dans les autorisations, on utilise en plus le champ boss et on ajoute l'autorisation boss
This commit is contained in:
parent
2270d65f55
commit
5d0c73b332
1 changed files with 14 additions and 28 deletions
|
@ -22,32 +22,26 @@ function auted_autoriser() {
|
||||||
|
|
||||||
|
|
||||||
// -----------------
|
// -----------------
|
||||||
// Objet aut_mods
|
// BOSS
|
||||||
|
function autoriser_boss_dist($faire, $type, $id, $qui, $opt) {
|
||||||
|
if (autoriser('webmestre', null, null, $qui, null)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if ($qui['boss'] === 'oui') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------
|
||||||
|
// Objet aut_modeles
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Autorisation de créer (autmodele)
|
* Autorisation de créer (autmodele)
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
function autoriser_autmodele_associer_dist($faire, $type, $id, $qui, $opt) {
|
function autoriser_autmodele_associer_dist($faire, $type, $id, $qui, $opt) {
|
||||||
return (autoriser('webmestre', '', '', $qui) or $qui['pgp'] === "boss");
|
return (autoriser('webmestre', '', '', $qui) or $qui['boss'] === "oui");
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -55,13 +49,5 @@ function autoriser_autmodele_voir_dist($faire, $type, $id, $qui, $opt) {
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
function autoriser_autmodele_modifier_dist($faire, $type, $id, $qui, $opt) {
|
function autoriser_autmodele_modifier_dist($faire, $type, $id, $qui, $opt) {
|
||||||
return (autoriser('webmestre', '', '', $qui) or $qui['pgp'] === "boss");
|
return (autoriser('webmestre', '', '', $qui) or $qui['boss'] === "oui");
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Autorisation de supprimer (autmodele)
|
|
||||||
*
|
|
||||||
**/
|
|
||||||
function autoriser_autmodele_supprimer_dist($faire, $type, $id, $qui, $opt) {
|
|
||||||
return (autoriser('webmestre', '', '', $qui) or $qui['pgp'] === "boss");
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue