|
|
|
@ -119,7 +119,7 @@ function autoriser_block_supprimer_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
* @param array $opt Options de cette autorisation
|
|
|
|
|
* @return bool true s'il a le droit, false sinon
|
|
|
|
|
**/
|
|
|
|
|
function autoriser_blockstype_creerblockdans_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
function autoriser_blocktype_creerblockdans_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
return ($id and autoriser('voir', 'blocktypes', $id) and autoriser('creer', 'block'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -157,7 +157,7 @@ function autoriser_block_iconifier_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
// Objet blocktypes
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Autorisation de voir un élément de menu (blockstypes)
|
|
|
|
|
* Autorisation de voir un élément de menu (blocktypes)
|
|
|
|
|
*
|
|
|
|
|
* @param string $faire Action demandée
|
|
|
|
|
* @param string $type Type d'objet sur lequel appliquer l'action
|
|
|
|
@ -166,12 +166,12 @@ function autoriser_block_iconifier_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
* @param array $opt Options de cette autorisation
|
|
|
|
|
* @return bool true s'il a le droit, false sinon
|
|
|
|
|
**/
|
|
|
|
|
function autoriser_blockstypes_menu_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
function autoriser_blocktypes_menu_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Autorisation de voir (blockstypes)
|
|
|
|
|
* Autorisation de voir (blocktypes)
|
|
|
|
|
*
|
|
|
|
|
* @param string $faire Action demandée
|
|
|
|
|
* @param string $type Type d'objet sur lequel appliquer l'action
|
|
|
|
@ -180,12 +180,12 @@ function autoriser_blockstypes_menu_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
* @param array $opt Options de cette autorisation
|
|
|
|
|
* @return bool true s'il a le droit, false sinon
|
|
|
|
|
**/
|
|
|
|
|
function autoriser_blockstypes_voir_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
function autoriser_blocktypes_voir_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Autorisation de voir (blockstype)
|
|
|
|
|
* Autorisation de voir (blocktype)
|
|
|
|
|
*
|
|
|
|
|
* @param string $faire Action demandée
|
|
|
|
|
* @param string $type Type d'objet sur lequel appliquer l'action
|
|
|
|
@ -194,12 +194,12 @@ function autoriser_blockstypes_voir_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
* @param array $opt Options de cette autorisation
|
|
|
|
|
* @return bool true s'il a le droit, false sinon
|
|
|
|
|
**/
|
|
|
|
|
function autoriser_blockstype_voir_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
function autoriser_blocktype_voir_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Autorisation de créer (blockstype)
|
|
|
|
|
* Autorisation de créer (blocktype)
|
|
|
|
|
*
|
|
|
|
|
* @param string $faire Action demandée
|
|
|
|
|
* @param string $type Type d'objet sur lequel appliquer l'action
|
|
|
|
@ -208,12 +208,12 @@ function autoriser_blockstype_voir_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
* @param array $opt Options de cette autorisation
|
|
|
|
|
* @return bool true s'il a le droit, false sinon
|
|
|
|
|
**/
|
|
|
|
|
function autoriser_blockstype_creer_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
function autoriser_blocktype_creer_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
return autoriser('webmestre', '', '', $qui);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Autorisation de modifier (blockstype)
|
|
|
|
|
* Autorisation de modifier (blocktype)
|
|
|
|
|
*
|
|
|
|
|
* @param string $faire Action demandée
|
|
|
|
|
* @param string $type Type d'objet sur lequel appliquer l'action
|
|
|
|
@ -222,12 +222,12 @@ function autoriser_blockstype_creer_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
* @param array $opt Options de cette autorisation
|
|
|
|
|
* @return bool true s'il a le droit, false sinon
|
|
|
|
|
**/
|
|
|
|
|
function autoriser_blockstype_modifier_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
function autoriser_blocktype_modifier_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
return autoriser('webmestre', '', '', $qui);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Autorisation de supprimer (blockstype)
|
|
|
|
|
* Autorisation de supprimer (blocktype)
|
|
|
|
|
*
|
|
|
|
|
* @param string $faire Action demandée
|
|
|
|
|
* @param string $type Type d'objet sur lequel appliquer l'action
|
|
|
|
@ -236,7 +236,7 @@ function autoriser_blockstype_modifier_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
* @param array $opt Options de cette autorisation
|
|
|
|
|
* @return bool true s'il a le droit, false sinon
|
|
|
|
|
**/
|
|
|
|
|
function autoriser_blockstype_supprimer_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
function autoriser_blocktype_supprimer_dist($faire, $type, $id, $qui, $opt) {
|
|
|
|
|
if (!sql_countsel('spip_blocks', 'id_blocktype = ' . (int)$id)) {
|
|
|
|
|
return autoriser('webmestre', '', '', $qui);
|
|
|
|
|
}
|
|
|
|
|