mirror of https://github.com/zulip/zulip.git
Don't let CUSTOMER4 users change their names through the JSON API.
(imported from commit ea1f26866e727eff995f78f1f0aeb6bb82b1b997)
This commit is contained in:
parent
118a2075d9
commit
c95a762e2f
|
@ -744,6 +744,13 @@ def do_change_password(user_profile, password, log=True, commit=True,
|
|||
'pwhash': user_profile.password})
|
||||
|
||||
def do_change_full_name(user_profile, full_name, log=True):
|
||||
if user_profile.realm.domain == "users.customer4.invalid":
|
||||
# At the request of the facilitators, CUSTOMER4 users
|
||||
# can't change their names. Failingly silently is fine -- they
|
||||
# can't do it through the UI, so they'd have to be trying to
|
||||
# break the rules.
|
||||
return
|
||||
|
||||
user_profile.full_name = full_name
|
||||
user_profile.save(update_fields=["full_name"])
|
||||
if log:
|
||||
|
|
Loading…
Reference in New Issue