diff --git a/framework/core/js/forum/dist/app.js b/framework/core/js/forum/dist/app.js index 217f002c2..4bcdd072e 100644 --- a/framework/core/js/forum/dist/app.js +++ b/framework/core/js/forum/dist/app.js @@ -27783,13 +27783,11 @@ System.register('flarum/components/SessionDropdown', ['flarum/helpers/avatar', ' href: app.route('settings') }), 50); - if (user.groups().some(function (group) { - return group.id() === Group.ADMINISTRATOR_ID; - })) { + if (app.forum.attribute('adminUrl')) { items.add('administration', LinkButton.component({ icon: 'wrench', children: app.translator.trans('core.forum.header.admin_button'), - href: app.forum.attribute('baseUrl') + '/admin', + href: app.forum.attribute('adminUrl'), target: '_blank', config: function config() {} }), 0); diff --git a/framework/core/js/forum/src/components/SessionDropdown.js b/framework/core/js/forum/src/components/SessionDropdown.js index 5d7d6d9c1..ae5792c35 100644 --- a/framework/core/js/forum/src/components/SessionDropdown.js +++ b/framework/core/js/forum/src/components/SessionDropdown.js @@ -62,12 +62,12 @@ export default class SessionDropdown extends Dropdown { 50 ); - if (user.groups().some(group => group.id() === Group.ADMINISTRATOR_ID)) { + if (app.forum.attribute('adminUrl')) { items.add('administration', LinkButton.component({ icon: 'wrench', children: app.translator.trans('core.forum.header.admin_button'), - href: app.forum.attribute('baseUrl') + '/admin', + href: app.forum.attribute('adminUrl'), target: '_blank', config: () => {} }),