settings: Allow admin to change email/name even if it is disabled in realm.

Allow realm admin users to change their email or name even,
changing name or email is disabled in realm.
This commit is contained in:
YJDave
2018-02-02 21:24:26 +05:30
committed by Tim Abbott
parent f0d651f9fe
commit ce46cd914a
7 changed files with 42 additions and 13 deletions

View File

@@ -104,7 +104,7 @@ exports.set_up = function () {
$("#change_full_name").on('click', function (e) {
e.preventDefault();
e.stopPropagation();
if (!page_params.realm_name_changes_disabled) {
if (!page_params.realm_name_changes_disabled || page_params.is_admin) {
overlays.open_modal('change_full_name_modal');
}
});
@@ -245,7 +245,7 @@ exports.set_up = function () {
$('#change_email').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
if (!page_params.realm_email_changes_disabled) {
if (!page_params.realm_email_changes_disabled || page_params.is_admin) {
overlays.open_modal('change_email_modal');
var email = $('#email_value').text().trim();
$('.email_change_container').find("input[name='email']").val(email);