Fix: création utilisateur avec CAS par non super-admin
This commit is contained in:
parent
7cf06a79e6
commit
40978f30ee
@ -596,7 +596,7 @@ def create_user_form(user_name=None, edit=0, all_roles=True):
|
|||||||
email=vals["email"],
|
email=vals["email"],
|
||||||
dept=vals.get("dept", auth_dept),
|
dept=vals.get("dept", auth_dept),
|
||||||
roles=vals["roles"],
|
roles=vals["roles"],
|
||||||
cas_id=vals["cas_id"],
|
cas_id=vals.get("cas_id"), # pas présent si pas super-admin
|
||||||
)
|
)
|
||||||
if not ok_modif:
|
if not ok_modif:
|
||||||
H.append(tf_error_message(msg))
|
H.append(tf_error_message(msg))
|
||||||
@ -729,12 +729,12 @@ def create_user_form(user_name=None, edit=0, all_roles=True):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
flash("Nouvel utilisateur créé")
|
||||||
return flask.redirect(
|
return flask.redirect(
|
||||||
url_for(
|
url_for(
|
||||||
"users.user_info_page",
|
"users.user_info_page",
|
||||||
scodoc_dept=g.scodoc_dept,
|
scodoc_dept=g.scodoc_dept,
|
||||||
user_name=user_name,
|
user_name=user_name,
|
||||||
head_message="Nouvel utilisateur créé",
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user