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: Fix the sorting of owner and admin in users list.

sahil839357e3c713587
diff --git a/static/js/settings_users.js b/static/js/settings_users.js
index 8a918b6e268..689001d9747 100644
--- a/static/js/settings_users.js
+++ b/static/js/settings_users.js
@@ -57,16 +57,19 @@ function sort_bot_email(a, b) {
function sort_role(a, b) {
function role(user) {
- if (user.is_admin) {
+ if (user.is_owner) {
return 0;
}
- if (user.is_moderator) {
+ if (user.is_admin) {
return 1;
}
+ if (user.is_moderator) {
+ return 2;
+ }
if (user.is_guest) {
- return 3;
+ return 4;
}
- return 2; // member
+ return 3; // member
}
return compare_a_b(role(a), role(b));
}