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:
Steve Howell 2014-01-21 19:47:37 -05:00
parent 887c2059b1
commit 1746af4df6

View File

@ -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