diff --git a/app/scodoc/TrivialFormulator.py b/app/scodoc/TrivialFormulator.py index ae700768..5b7020a8 100644 --- a/app/scodoc/TrivialFormulator.py +++ b/app/scodoc/TrivialFormulator.py @@ -730,11 +730,7 @@ var {field}_as = new bsn.AutoSuggest('{field}', {field}_opts); R.append("%s" % title) R.append('' % klass) - if ( - input_type == "text" - or input_type == "text_suggest" - or input_type == "color" - ): + if input_type in ("text", "text_suggest", "color", "datedmy"): R.append(("%(" + field + ")s") % self.values) elif input_type in ("radio", "menu", "checkbox", "boolcheckbox"): if input_type == "boolcheckbox": diff --git a/app/scodoc/sco_exceptions.py b/app/scodoc/sco_exceptions.py index 25375099..967b26f7 100644 --- a/app/scodoc/sco_exceptions.py +++ b/app/scodoc/sco_exceptions.py @@ -47,6 +47,15 @@ class ScoValueError(ScoException): self.dest_url = dest_url +class ScoPermissionDenied(ScoValueError): + """Permission non accordée (appli web)""" + + def __init__(self, msg=None, dest_url=None): + if msg is None: + msg = "Opération non autorisée !" + super().__init__(msg, dest_url=dest_url) + + class ScoBugCatcher(ScoException): "bug avec enquete en cours" diff --git a/app/scodoc/sco_permissions.py b/app/scodoc/sco_permissions.py index 5e1bd8c4..07d606e8 100644 --- a/app/scodoc/sco_permissions.py +++ b/app/scodoc/sco_permissions.py @@ -15,8 +15,8 @@ _SCO_PERMISSIONS = ( (1 << 2, "ScoView", "Voir"), (1 << 3, "ScoEnsView", "Voir les parties pour les enseignants"), (1 << 4, "ScoObservateur", "Observer (accès lecture restreint aux bulletins)"), - (1 << 5, "ScoUsersAdmin", "Gérer les utilisateurs"), - (1 << 6, "ScoUsersView", "Voir les utilisateurs"), + (1 << 5, "ScoUsersAdmin", "Gérer les utilisateurs (de son département)"), + (1 << 6, "ScoUsersView", "Voir les utilisateurs (de tous les dépts)"), (1 << 7, "ScoChangePreferences", "Modifier les préférences"), (1 << 8, "ScoChangeFormation", "Changer les formations"), (1 << 9, "ScoEditFormationTags", "Tagguer les formations"), diff --git a/app/templates/auth/user_info_page.html b/app/templates/auth/user_info_page.html index f344fb11..1c222329 100644 --- a/app/templates/auth/user_info_page.html +++ b/app/templates/auth/user_info_page.html @@ -18,23 +18,33 @@ {{user.date_expiration.isoformat() if user.date_expiration else "(sans limite)"}}

{% if current_user.id == user.id %} @@ -45,7 +55,7 @@ {# Liste des permissions #}
-

Permissions de cet utilisateur dans le département {{dept}}:

+

Permissions de cet utilisateur dans le département {{dept}}: