amelioration ordre autorisations
This commit is contained in:
parent
6a5b838289
commit
643f5aee98
1 changed files with 16 additions and 8 deletions
|
@ -21,34 +21,42 @@ function gamuform_autoriser() {
|
|||
}
|
||||
|
||||
function autoriser_gamuform_modifier_dist($faire, $type, $id, $qui, $opt) {
|
||||
if (autoriser('webmestre')) {
|
||||
return true;
|
||||
}
|
||||
if (!empty($opt['objet'])) {
|
||||
return autoriser('modifier', $opt['objet'], $id, $qui, []);
|
||||
}
|
||||
|
||||
return autoriser('webmestre');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function autoriser_gamuform_voir_dist($faire, $type, $id, $qui, $opt) {
|
||||
if (autoriser('webmestre')) {
|
||||
return true;
|
||||
}
|
||||
if (!empty($opt['objet'])) {
|
||||
return autoriser('voir', $opt['objet'], $id, $qui, []);
|
||||
}
|
||||
|
||||
return autoriser('webmestre');
|
||||
return false;
|
||||
}
|
||||
|
||||
function autoriser_gamuform_creer_dist($faire, $type, $id, $qui, $opt) {
|
||||
if (autoriser('webmestre')) {
|
||||
return true;
|
||||
}
|
||||
if (!empty($opt['objet'])) {
|
||||
return autoriser('creer', $opt['objet'], $id, $qui, []);
|
||||
}
|
||||
|
||||
return autoriser('webmestre');
|
||||
return false;
|
||||
}
|
||||
|
||||
function autoriser_gamuform_supprimer_dist($faire, $type, $id, $qui, $opt) {
|
||||
if (autoriser('webmestre')) {
|
||||
return true;
|
||||
}
|
||||
if (!empty($opt['objet'])) {
|
||||
return autoriser('voir', $opt['objet'], $id, $qui, []);
|
||||
}
|
||||
|
||||
return autoriser('webmestre');
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue