org settings: Add setting to prevent users from adding bots.

Fixes: #7908.
This commit is contained in:
Shubham Dhama
2018-01-29 20:40:54 +05:30
committed by Tim Abbott
parent 7c830c5767
commit 777b6de689
20 changed files with 252 additions and 49 deletions

View File

@@ -41,8 +41,6 @@ function _setup_page() {
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_create_generic_bot_by_admins_only:
page_params.realm_create_generic_bot_by_admins_only,
realm_allow_message_deleting: page_params.realm_allow_message_deleting,
realm_allow_message_editing: page_params.realm_allow_message_editing,
realm_message_content_edit_limit_minutes:
@@ -62,10 +60,14 @@ function _setup_page() {
realm_send_welcome_emails: page_params.realm_send_welcome_emails,
};
options.bot_creation_policy_values = settings_bots.bot_creation_policy_values;
var admin_tab = templates.render('admin_tab', options);
$("#settings_content .organization-box").html(admin_tab);
$("#settings_content .alert").removeClass("show");
settings_bots.update_bot_settings_tip();
$("#id_realm_bot_creation_policy").val(page_params.realm_bot_creation_policy);
// Since we just swapped in a whole new page, we need to
// tell admin_sections nothing is loaded.
admin_sections.reset_sections();