realm owner: Add frontend implementation of owner role.

This commit adds the option of owner role in user role dropdown
and also takes care of the restrictions while adding/removing
owner status of the user.
This commit also handles the places where we dispaly role of
the user in UI.
This commit is contained in:
sahil839
2020-06-04 03:00:34 +05:30
committed by Tim Abbott
parent aa70baba71
commit c7a68d60f3
9 changed files with 46 additions and 5 deletions

View File

@@ -243,7 +243,9 @@ exports.get_user_time = function (user_id) {
exports.get_user_type = function (user_id) {
const user_profile = exports.get_by_user_id(user_id);
if (user_profile.is_admin) {
if (user_profile.is_owner) {
return i18n.t("Owner");
} else if (user_profile.is_admin) {
return i18n.t("Administrator");
} else if (user_profile.is_guest) {
return i18n.t("Guest");