From 1746af4df609db4fcba3704128b9e0bff90c664b Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Tue, 21 Jan 2014 19:47:37 -0500 Subject: [PATCH] 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) --- static/js/zulip.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/static/js/zulip.js b/static/js/zulip.js index 602210a396..1bbdbaed98 100644 --- a/static/js/zulip.js +++ b/static/js/zulip.js @@ -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