emoji: Don't lock out admins when only admins are allowed to upload emoji.

Prior to this, when the setting for controlling whether can admins only
upload an emoji was set to true, we were not displaying upload emoji form
even for admins and as a result they were locked out.
This commit is contained in:
Harshit Bansal
2017-07-11 19:59:40 +00:00
committed by Tim Abbott
parent db3539438c
commit 86de196d12
2 changed files with 2 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ function _setup_page() {
realm_name_changes_disabled: page_params.realm_name_changes_disabled,
realm_email_changes_disabled: page_params.realm_email_changes_disabled,
realm_add_emoji_by_admins_only: page_params.realm_add_emoji_by_admins_only,
can_admin_emojis: page_params.is_admin || !page_params.realm_add_emoji_by_admins_only,
realm_allow_message_editing: page_params.realm_allow_message_editing,
realm_message_content_edit_limit_minutes:
Math.ceil(page_params.realm_message_content_edit_limit_seconds / 60),