Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
Showing only changes of commit 3ecbe5128e - Show all commits

View File

@ -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)
vals.pop("cas_allow_scodoc_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: