diff --git a/static/js/settings_users.js b/static/js/settings_users.js index 689001d974..b93eb00fd7 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) {