From 8057b721527d681cc87382fcf60251fe875da3d4 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 2 Sep 2023 22:21:31 +0200 Subject: [PATCH] =?UTF-8?q?Oubli=20dans=20le=20commit=20pr=C3=A9c=C3=A9den?= =?UTF-8?q?t:=20supprime=20sco=5Fpermissions=5Fcheck.can=5Fchange=5Fgroups?= =?UTF-8?q?()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_permissions_check.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/scodoc/sco_permissions_check.py b/app/scodoc/sco_permissions_check.py index 495a1eb4b..1b6b36818 100644 --- a/app/scodoc/sco_permissions_check.py +++ b/app/scodoc/sco_permissions_check.py @@ -117,18 +117,6 @@ def check_access_diretud(formsemestre_id, required_permission=Permission.ScoImpl return True, "" -def can_change_groups(formsemestre_id: int) -> bool: - """Vrai si l'utilisateur peut changer les groupes dans ce semestre - Obsolete: utiliser FormSemestre.can_change_groups - """ - formsemestre: FormSemestre = FormSemestre.query.get_or_404(formsemestre_id) - if not formsemestre.etat: - return False # semestre verrouillé - if current_user.has_permission(Permission.ScoEtudChangeGroups): - return True # typiquement admin, chef dept - return formsemestre.est_responsable(current_user) - - def can_handle_passwd(user: User, allow_admindepts=False) -> bool: """True if the current user can see or change passwd info of user. If allow_admindepts, allow Admin from all depts (so they can view users from other depts