[scodoc-devel] [SVN] Scolar : [1817] Fix: bug acces prefs semestre par dir.

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Lun 22 Oct 20:16:07 CEST 2018


Une pièce jointe HTML a été nettoyée...
URL: https://listes.univ-paris13.fr/pipermail/scodoc-devel/attachments/20181022/f3b35880/attachment.htm 
-------------- section suivante --------------
Modified: branches/ScoDoc7/ZScolar.py
===================================================================
--- branches/ScoDoc7/ZScolar.py	2018-10-19 17:11:09 UTC (rev 1816)
+++ branches/ScoDoc7/ZScolar.py	2018-10-22 18:16:06 UTC (rev 1817)
@@ -428,7 +428,7 @@
         """Edit preferences for a semestre"""
         authuser = REQUEST.AUTHENTICATED_USER
         sem = sco_formsemestre.get_formsemestre(self.Notes, formsemestre_id)
-        ok = (authuser.has_permission(ScoImplement, self) or (sem['responsable_id'] == str(authuser) and sem['resp_can_edit'])) and (sem['etat'] == '1')
+        ok = (authuser.has_permission(ScoImplement, self) or ((str(authuser) in sem['responsables']) and sem['resp_can_edit'])) and (sem['etat'] == '1')
         if ok:
             return self.get_preferences(formsemestre_id=formsemestre_id).edit(REQUEST=REQUEST)
         else:


Plus d'informations sur la liste de diffusion scodoc-devel