diff --git a/app/decorators.py b/app/decorators.py index b8bc694b78..93feccc71b 100644 --- a/app/decorators.py +++ b/app/decorators.py @@ -76,7 +76,7 @@ class ZResponse(object): return flask.redirect(url) # http 302 def setHeader(self, header, value): - self.headers[header.tolower()] = value + self.headers[header.lower()] = value def permission_required(permission): diff --git a/app/scodoc/ZEntreprises.py b/app/scodoc/ZEntreprises.py index dd7f504722..56be1de44d 100644 --- a/app/scodoc/ZEntreprises.py +++ b/app/scodoc/ZEntreprises.py @@ -111,7 +111,9 @@ class ZEntreprises( ") - if authuser.has_permission(ScoUsersAdmin, self): + if authuser.has_permission(Permission.ScoUsersAdmin, self): H.append( '

Liste de tous les utilisateurs

' % self.ScoURL() @@ -602,13 +602,13 @@ class ZScoUsers( else: H.append("

Création d'un utilisateur

") - if authuser.has_permission(ScoSuperAdmin, self): + if authuser.has_permission(Permission.ScoSuperAdmin, self): H.append("""

Vous êtes super administrateur !

""") # Noms de roles pouvant etre attribues aux utilisateurs via ce dialogue # si pas SuperAdmin, restreint aux rôles EnsX, SecrX, DeptX # - if authuser.has_permission(ScoSuperAdmin, self): + if authuser.has_permission(Permission.ScoSuperAdmin, self): log("create_user_form called by %s (super admin)" % (auth_name,)) editable_roles = set(self._all_roles()) else: diff --git a/app/scodoc/html_sco_header.py b/app/scodoc/html_sco_header.py index 89003b667f..3eb22aab4f 100644 --- a/app/scodoc/html_sco_header.py +++ b/app/scodoc/html_sco_header.py @@ -28,7 +28,6 @@ import cgi import sco_utils as scu -from sco_formsemestre_status import formsemestre_page_title """ HTML Header/Footer for ScoDoc pages @@ -263,3 +262,6 @@ def sco_footer(context, REQUEST=None): return ( """""" + scu.CUSTOM_HTML_FOOTER + """""" ) + + +from sco_formsemestre_status import formsemestre_page_title diff --git a/app/scodoc/html_sidebar.py b/app/scodoc/html_sidebar.py index 5fc75035d2..76b8253baf 100644 --- a/app/scodoc/html_sidebar.py +++ b/app/scodoc/html_sidebar.py @@ -62,14 +62,14 @@ def sidebar_common(context, REQUEST=None): % params, ] - if authuser.has_permission(ScoUsersAdmin, context) or authuser.has_permission( - ScoUsersView, context - ): + if authuser.has_permission( + Permission.ScoUsersAdmin, context + ) or authuser.has_permission(ScoUsersView, context): H.append( """Utilisateurs
""" % params ) - if authuser.has_permission(ScoChangePreferences, context): + if authuser.has_permission(Permission.ScoChangePreferences, context): H.append( """Paramétrage
""" % params @@ -120,7 +120,7 @@ def sidebar(context, REQUEST=None): ) H.append("