X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/?a=blobdiff_plain;f=www%2Fplugins-dist%2Forganiseur%2Forganiseur_autoriser.php;h=6e74f03c287176d1fdc9e6015c0bce50914422a6;hb=f489d45ae677afde12ba9c9f70f463ea34787b45;hp=15d0e672723ba1d27579639f9ad36ec734deee72;hpb=0dda6af18a04031b1ca8e217187966077e752fe3;p=ptitvelo%2Fweb%2Fwww.git diff --git a/www/plugins-dist/organiseur/organiseur_autoriser.php b/www/plugins-dist/organiseur/organiseur_autoriser.php index 15d0e67..6e74f03 100644 --- a/www/plugins-dist/organiseur/organiseur_autoriser.php +++ b/www/plugins-dist/organiseur/organiseur_autoriser.php @@ -44,6 +44,9 @@ function autoriser_message_modifier_dist($faire, $type='', $id=0, $qui = NULL, $ } function autoriser_message_instituer_dist($faire, $type='', $id=0, $qui = NULL, $opt = NULL){ + // rediriger vers la bonne autorisation en cas de suppression + if ($opt['statut'] == 'poub') + return autoriser('supprimer','message',$id,$qui,$opt); return autoriser('modifier','message',$id,$qui,$opt); } @@ -78,10 +81,11 @@ function autoriser_message_dater_dist($faire, $type='', $id=0, $qui = NULL, $opt return false; } -// par defaut, autorisation commune a tous les type de message -// peut etre surchargee en fonction de $type (pb,affich,normal) function autoriser_envoyermessage_dist($faire, $type='', $id=0, $qui = NULL, $opt = NULL){ - if(!($GLOBALS['meta']['messagerie_agenda'] == 'oui') OR !intval($qui['id_auteur'])) + if (!($GLOBALS['meta']['messagerie_agenda'] == 'oui') OR !intval($qui['id_auteur'])) + return false; + // on peut envoyer une annonce si on est admin + if (!($qui['statut']=='0minirezo') AND $type=='affich') return false; return true; }