mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Reflect is_admin changes on the client.
The client's update_person() method will look for an is_admin change and update the gear menu as needed, as well as the underlying data structures that help draw the admin page user list. (imported from commit af8c173886d63dd102c63336bbca176f49e1036d)
This commit is contained in:
parent
887c2059b1
commit
1746af4df6
@ -103,6 +103,15 @@ function update_person(person) {
|
||||
}
|
||||
}
|
||||
|
||||
if (_.has(person, 'is_admin')) {
|
||||
person_obj.is_admin = person.is_admin;
|
||||
|
||||
if (person.email === page_params.email) {
|
||||
page_params.is_admin = person.is_admin;
|
||||
admin.show_or_hide_menu_item();
|
||||
}
|
||||
}
|
||||
|
||||
activity.set_user_statuses([]);
|
||||
|
||||
// TODO: update sender names on messages
|
||||
|
||||
Loading…
Reference in New Issue
Block a user