mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Don't display all groups option if group directory is disabled.a
https://meta.discourse.org/t/all-groups-option-leads-to-access-denied-page/88464
This commit is contained in:
@@ -29,11 +29,15 @@ export default ComboBoxComponent.extend({
|
||||
|
||||
@computed
|
||||
collectionHeader() {
|
||||
return `
|
||||
<a href="${Discourse.getURL("/groups")}" class="group-dropdown-filter">
|
||||
${I18n.t("groups.index.all").toLowerCase()}
|
||||
</a>
|
||||
`.htmlSafe();
|
||||
if (this.siteSettings.enable_group_directory ||
|
||||
(this.currentUser && this.currentUser.get('staff'))) {
|
||||
|
||||
return `
|
||||
<a href="${Discourse.getURL("/groups")}" class="group-dropdown-filter">
|
||||
${I18n.t("groups.index.all").toLowerCase()}
|
||||
</a>
|
||||
`.htmlSafe();
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
||||
Reference in New Issue
Block a user