mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
admin: Add realm option to prevent users from changing their name.
A realm option to prevent users from changing their name is added. Fixes #3950.
This commit is contained in:
committed by
Tim Abbott
parent
dc48b87765
commit
ef7e15ee00
@@ -3415,3 +3415,15 @@ def do_set_email_changes_disabled(realm, email_changes_disabled):
|
||||
value=email_changes_disabled,
|
||||
)
|
||||
send_event(event, active_user_ids(realm))
|
||||
|
||||
def do_set_name_changes_disabled(realm, name_changes_disabled):
|
||||
# type: (Realm, bool) -> None
|
||||
realm.name_changes_disabled = name_changes_disabled
|
||||
realm.save(update_fields=['name_changes_disabled'])
|
||||
event = dict(
|
||||
type="realm",
|
||||
op="update",
|
||||
property='name_changes_disabled',
|
||||
value=name_changes_disabled,
|
||||
)
|
||||
send_event(event, active_user_ids(realm))
|
||||
|
||||
Reference in New Issue
Block a user