forked from ScoDoc/ScoDoc
Fix formulaire modif utilisateur (CAS allow login)
This commit is contained in:
parent
bee72be885
commit
3ecbe5128e
@ -594,8 +594,14 @@ def create_user_form(user_name=None, edit=0, all_roles=True):
|
||||
roles = set(vals["roles"]).intersection(editable_roles_strings)
|
||||
if not current_user.is_administrator():
|
||||
# empeche modification des paramètres CAS
|
||||
vals.pop("cas_allow_login", None)
|
||||
if "cas_allow_login" in vals:
|
||||
vals["cas_allow_login"] = cas_allow_login_default
|
||||
if "cas_allow_scodoc_login" in vals:
|
||||
if the_user is None:
|
||||
vals.pop("cas_allow_scodoc_login", None)
|
||||
else:
|
||||
vals["cas_allow_scodoc_login"] = the_user.cas_allow_scodoc_login
|
||||
|
||||
if not current_user.has_permission(Permission.UsersChangeCASId):
|
||||
vals.pop("cas_id", None)
|
||||
if "edit" in vals:
|
||||
|
Loading…
Reference in New Issue
Block a user