From 28e019d05db0d6918819236823d77dd57139705d Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Mon, 4 Dec 2023 10:56:36 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20restrictions=20acc=C3=A8s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 ------- categories/delete_category.html | 2 +- categories/index.html | 2 +- categories/list_equipment.html | 2 +- categories/modify_category.html | 2 +- historique.html | 1 + index.html | 1 + inventaire.html | 1 + modifier_materiel.html | 1 + mouvements/delete_movement.html | 2 +- mouvements/entrees/delete_entree.html | 2 +- mouvements/entrees/index.html | 2 +- mouvements/entrees/non_repertorie.html | 2 +- mouvements/entrees/repertorie.html | 2 +- mouvements/entrees/retour.html | 2 +- mouvements/modifier_mouvement.html | 2 ++ mouvements/sorties/delete_sortie.html | 2 +- mouvements/sorties/emprunte.html | 2 +- mouvements/sorties/index.html | 2 +- mouvements/sorties/stock_disponible.html | 2 +- 20 files changed, 20 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 3d96f42..8c1cce5 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,6 @@ Ce module permet de gérer les matériels de l'association: stock, entrées, sorties. -## Installation -- Télécharger le fichier - [equipment.tar.gz](https://git.roflcopter.fr/lesanges/equipment.tar.gz) - et le désarchiver dans le répertoire répertoire modules de - l'installation de paheko. -- Activer le module via le menu "Configuration > Extensions" de Paheko. - ## Configuration - Il y a plusieurs types d'entrée et de sorties prédéfinies (Achat, Location, Vente, ...) mais il est possible d'en ajouter d'autres. diff --git a/categories/delete_category.html b/categories/delete_category.html index 512e1a7..ce855db 100644 --- a/categories/delete_category.html +++ b/categories/delete_category.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="write" block=true}}{{/restrict}} {{:admin_header title="Supprimer une catégorie" current="module_equipment"}} {{#load key=$_GET.key assign="category"}} diff --git a/categories/index.html b/categories/index.html index 56e4270..12f66a6 100644 --- a/categories/index.html +++ b/categories/index.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="read" block=true}}{{/restrict}} {{:admin_header title="Gestion des matériels" current="module_equipment"}} {{* barre de navigation *}} diff --git a/categories/list_equipment.html b/categories/list_equipment.html index 76725a0..56dc829 100644 --- a/categories/list_equipment.html +++ b/categories/list_equipment.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="read" block=true}}{{/restrict}} {{#load key=$_GET.key}} {{:assign cat_name=$name}} diff --git a/categories/modify_category.html b/categories/modify_category.html index 67fd5f3..b09b3c1 100644 --- a/categories/modify_category.html +++ b/categories/modify_category.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="write" block=true}}{{/restrict}} {{:admin_header title="Modifier une catégorie" current="module_equipment"}} {{#load key=$_GET.key assign="category"}} diff --git a/historique.html b/historique.html index 3f014f0..a62100e 100644 --- a/historique.html +++ b/historique.html @@ -1,3 +1,4 @@ +{{#restrict section="accounting" level="read"}} {{:admin_header title="Historique des mouvements" current="module_equipment"}} {{:assign equipment_key=$_GET.key|trim}} diff --git a/index.html b/index.html index 744dace..b77cec9 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,4 @@ +{{#restrict section="accounting" level="read"}} {{:admin_header title="Gestion des matériels" custom_css=$custom_css current="module_equipment"}} {{* barre de navigation *}} diff --git a/inventaire.html b/inventaire.html index 7a103d5..54b68f7 100644 --- a/inventaire.html +++ b/inventaire.html @@ -1,3 +1,4 @@ +{{#restrict section="accounting" level="read"}} {{* inventaire des entrées/sorties des matériels des catégories de la variable $categories *}} {{* Extraire et compiler les infos de la base *}} diff --git a/modifier_materiel.html b/modifier_materiel.html index a90183a..6c12396 100644 --- a/modifier_materiel.html +++ b/modifier_materiel.html @@ -1,3 +1,4 @@ +{{#restrict section="accounting" level="write" block="true"}} {{:admin_header title="Modifier matériel" current="module_equipment"}} {{:assign equipment_key=$_GET.key|trim}} diff --git a/mouvements/delete_movement.html b/mouvements/delete_movement.html index 157454d..f424cb9 100644 --- a/mouvements/delete_movement.html +++ b/mouvements/delete_movement.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="write" block=true}}{{/restrict}} {{:assign var="type_movement" value=$_GET.mvt}} {{:admin_header title="Supprimer une %s"|args:$type_movement current="module_equipment"}} diff --git a/mouvements/entrees/delete_entree.html b/mouvements/entrees/delete_entree.html index cf94703..5f275dd 100644 --- a/mouvements/entrees/delete_entree.html +++ b/mouvements/entrees/delete_entree.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="write" block=true}}{{/restrict}} {{:admin_header title="Supprimer une entrée" current="module_equipment"}} {{* récupérer les infos du mouvement à supprimer et du matériel associé *}} diff --git a/mouvements/entrees/index.html b/mouvements/entrees/index.html index b7fc8de..9818b16 100644 --- a/mouvements/entrees/index.html +++ b/mouvements/entrees/index.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="read" block=true}}{{/restrict}} {{:admin_header title="Gestion des matériels" current="module_equipment"}} {{* barre de navigation *}} diff --git a/mouvements/entrees/non_repertorie.html b/mouvements/entrees/non_repertorie.html index be08ae6..6e2340b 100644 --- a/mouvements/entrees/non_repertorie.html +++ b/mouvements/entrees/non_repertorie.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="write" block=true}}{{/restrict}} {{:admin_header title="Gestion des matériels" current="module_equipment"}} {{if $_GET.dialog === null}} diff --git a/mouvements/entrees/repertorie.html b/mouvements/entrees/repertorie.html index e047aa3..a21d615 100644 --- a/mouvements/entrees/repertorie.html +++ b/mouvements/entrees/repertorie.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="write" block=true}}{{/restrict}} {{:admin_header title="Gestion des matériels" current="module_equipment"}} {{if $_GET.dialog === null}} diff --git a/mouvements/entrees/retour.html b/mouvements/entrees/retour.html index 5bc47a0..6783a3f 100644 --- a/mouvements/entrees/retour.html +++ b/mouvements/entrees/retour.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="write" block=true}}{{/restrict}} {{:admin_header title="Gestion des matériels" current="module_equipment"}} {{if $_GET.dialog === null}} diff --git a/mouvements/modifier_mouvement.html b/mouvements/modifier_mouvement.html index 6c7b588..8c24b5d 100644 --- a/mouvements/modifier_mouvement.html +++ b/mouvements/modifier_mouvement.html @@ -25,6 +25,8 @@ {{:assign date_init=$mvt_modif.date|date_short}} {{:assign key_eqpmt_init=$mvt_modif.equipment}} +{{#restrict section="accounting" level="write" block=true}}{{/restrict}} + {{* récupérer la config des entrées/sorties *}} {{:include file="/%s/_get_config.html"|args:$module.name keep="config"}} diff --git a/mouvements/sorties/delete_sortie.html b/mouvements/sorties/delete_sortie.html index 9c3dc21..4231456 100644 --- a/mouvements/sorties/delete_sortie.html +++ b/mouvements/sorties/delete_sortie.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} + {{#restrict section="accounting" level="write" block=true}}{{/restrict}} {{:admin_header title="Supprimer une sortie" current="module_equipment"}} {{* récupérer les infos du mouvement à supprimer et du matériel associé *}} diff --git a/mouvements/sorties/emprunte.html b/mouvements/sorties/emprunte.html index edfb52d..e8b832a 100644 --- a/mouvements/sorties/emprunte.html +++ b/mouvements/sorties/emprunte.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="read"}} {{:admin_header title="Gestion des matériels" current="module_equipment"}} {{if $_GET.dialog === null}} diff --git a/mouvements/sorties/index.html b/mouvements/sorties/index.html index 81bf8a0..00d8a06 100644 --- a/mouvements/sorties/index.html +++ b/mouvements/sorties/index.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="read"}} {{:admin_header title="Gestion des matériels" current="module_equipment"}} {{* barre de navigation *}} diff --git a/mouvements/sorties/stock_disponible.html b/mouvements/sorties/stock_disponible.html index a60d514..cd406d6 100644 --- a/mouvements/sorties/stock_disponible.html +++ b/mouvements/sorties/stock_disponible.html @@ -1,4 +1,4 @@ -{{#restrict section="config" level="admin" block=true}}{{/restrict}} +{{#restrict section="accounting" level="write" block=true}}{{/restrict}} {{:admin_header title="Gestion des matériels" current="module_equipment"}} {{if $_GET.dialog === null}}