mirror of https://github.com/zulip/zulip.git
settings_org: Enhance `show_emails` for admins only case too.
This adds on the `is_admin` clause to show_emails.
This commit is contained in:
parent
a7f2bedb15
commit
ac2f1cea9c
|
@ -21,6 +21,8 @@ popovers.hide_user_profile = noop;
|
|||
|
||||
set_global('current_msg_list', {});
|
||||
set_global('page_params', {
|
||||
is_admin: false,
|
||||
realm_email_address_visibility: 3,
|
||||
custom_profile_fields: [],
|
||||
});
|
||||
set_global('rows', {});
|
||||
|
|
|
@ -58,8 +58,14 @@ exports.email_address_visibility_values = {
|
|||
|
||||
exports.show_email = function () {
|
||||
// TODO: Extend this when we add support for admins_and_members above.
|
||||
return page_params.realm_email_address_visibility ===
|
||||
exports.email_address_visibility_values.everyone.code;
|
||||
if (page_params.realm_email_address_visibility ===
|
||||
exports.email_address_visibility_values.everyone.code) {
|
||||
return true;
|
||||
}
|
||||
if (page_params.realm_email_address_visibility ===
|
||||
exports.email_address_visibility_values.admins_only.code) {
|
||||
return page_params.is_admin;
|
||||
}
|
||||
};
|
||||
|
||||
exports.get_realm_time_limits_in_minutes = function (property) {
|
||||
|
|
Loading…
Reference in New Issue