Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings_users: Directly use role value in sort_role.

sahil839c09e3fd84566
diff --git a/static/js/settings_users.js b/static/js/settings_users.js
index 689001d9747..b93eb00fd7d 100644
--- a/static/js/settings_users.js
+++ b/static/js/settings_users.js
@@ -56,22 +56,7 @@ function sort_bot_email(a, b) {
}
function sort_role(a, b) {
- function role(user) {
- if (user.is_owner) {
- return 0;
- }
- if (user.is_admin) {
- return 1;
- }
- if (user.is_moderator) {
- return 2;
- }
- if (user.is_guest) {
- return 4;
- }
- return 3; // member
- }
- return compare_a_b(role(a), role(b));
+ return compare_a_b(a.role, b.role);
}
function sort_bot_owner(a, b) {