mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
users: Use role value directly to display user role text in frontend.
Since, we now get role value in person objects sent from server, we can simply user user_role_map to display role in different places instead of having multiple if-else conditions to check flags like is_admin, is_guest, etc.
This commit is contained in:
@@ -239,9 +239,7 @@ function human_info(person) {
|
||||
const info = {};
|
||||
|
||||
info.is_bot = false;
|
||||
info.is_admin = person.is_admin;
|
||||
info.is_guest = person.is_guest;
|
||||
info.is_owner = person.is_owner;
|
||||
info.user_role_text = people.get_user_type(person.user_id);
|
||||
info.is_active = people.is_person_active(person.user_id);
|
||||
info.user_id = person.user_id;
|
||||
info.full_name = person.full_name;
|
||||
|
||||
Reference in New Issue
Block a user