mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
bots: Hide UI for adding new bots for guest users.
This commit is contained in:
committed by
Tim Abbott
parent
603139500a
commit
417f01386d
@@ -150,6 +150,10 @@ exports.can_create_new_bots = function () {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (page_params.is_guest) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return page_params.realm_bot_creation_policy !==
|
return page_params.realm_bot_creation_policy !==
|
||||||
exports.bot_creation_policy_values.admins_only.code;
|
exports.bot_creation_policy_values.admins_only.code;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<div id="bot-settings" class="settings-section" data-name="your-bots">
|
<div id="bot-settings" class="settings-section" data-name="your-bots">
|
||||||
<div class="bot-settings-form">
|
<div class="bot-settings-form">
|
||||||
|
{{#unless page_params.is_guest}}
|
||||||
<div class="tip">
|
<div class="tip">
|
||||||
{{#tr this}}Looking for our <a href="/integrations" target="_blank">Integrations</a> or <a href="/api" target="_blank">API</a> documentation?{{/tr}}
|
{{#tr this}}Looking for our <a href="/integrations" target="_blank">Integrations</a> or <a href="/api" target="_blank">API</a> documentation?{{/tr}}
|
||||||
</div>
|
</div>
|
||||||
@@ -11,6 +12,7 @@
|
|||||||
<i class="icon-vector-download-alt sea-green"></i>
|
<i class="icon-vector-download-alt sea-green"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
<ul class="nav nav-tabs nav-justified" id="bots_lists_navbar">
|
<ul class="nav nav-tabs nav-justified" id="bots_lists_navbar">
|
||||||
<li class="active active-bots-tab"><a>{{t "Active bots" }}</a></li>
|
<li class="active active-bots-tab"><a>{{t "Active bots" }}</a></li>
|
||||||
|
|||||||
Reference in New Issue
Block a user