From 0ed24550286c51ffaf76c1d7c0023084880e6c74 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 27 Mar 2024 17:12:28 +0100 Subject: [PATCH] =?UTF-8?q?ne=20pr=C3=A9sente=20plus=20le=20lien=20'ajoute?= =?UTF-8?q?r=20semestre'=20si=20on=20n'a=20pas=20le=20droit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_formations.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_formations.py b/app/scodoc/sco_formations.py index 125e8215..6e9177f1 100644 --- a/app/scodoc/sco_formations.py +++ b/app/scodoc/sco_formations.py @@ -507,6 +507,7 @@ def formation_list_table() -> GenTable: ) editable = current_user.has_permission(Permission.EditFormation) + can_implement = current_user.has_permission(Permission.EditFormSemestre) # Traduit/ajoute des champs à afficher: rows = [] @@ -547,15 +548,18 @@ def formation_list_table() -> GenTable: )}">{s.session_id()}""" for s in row["formsemestres"] ] - + [ - f"""ajouter """ - ] + ] + if can_implement + else [] + ) ) if row["formsemestres"]: row["date_fin_dernier_sem"] = (