Constante AUTEURS_MIN_REDAC & CORE

Vincent Callies <[email protected]>
Newsgroups gmane.comp.web.spip.devel
Message-ID <CADbHwBAmj09y9Nq+Bvu9H+n5EwadQUvcrXr1P-Y+h1KfsX4sOQ@mail.gmail.com>
Bonjour,

Comment puis-je faire une demande de ticket pour le CORE de SPIP ?

Une rédaction dans les autorisations me parait peut être perfectible.
https://git.spip.net/spip/spip/src/branch/master/ecrire/inc/autoriser.php

Il s'agit de l'importante autorisation ecrire.

L'autorisation n'utilise pas la constante AUTEURS_MIN_REDAC décrivant les
statuts des auteurs pouvant écrire (statut > 1comite).
Or, il me semble que si cette constante existe nativement, autant la rendre
utile sans contraindre à une surcharge de l'autorisation.
Voici donc une suggestion pour ce faire :

function autoriser_ecrire($faire, $type, $id, $qui, $opt) {
if (defined('AUTEURS_MIN_REDAC')) {
$redacteurs = explode (',', AUTEURS_MIN_REDAC);
  return isset($qui['statut']) and in_array($qui['statut'], $redacteurs);
}
  return isset($qui['statut']) and in_array($qui['statut'],
array('0minirezo', '1comite'));
}

Thrax
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.