mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 16:24:55 +00:00
FIX: Check for staff without triggering anonymous user error (#20819)
Followup to 142d2ab65ecf31a1df1d0cd23e533d84c120b683
This commit is contained in:
parent
ef0016cdba
commit
e47af9bb72
@ -3,6 +3,11 @@ import hbs from "discourse/widgets/hbs-compiler";
|
||||
|
||||
createWidget("header-contents", {
|
||||
tagName: "div.contents.clearfix",
|
||||
transform() {
|
||||
return {
|
||||
staff: this.get("currentUser.staff"),
|
||||
};
|
||||
},
|
||||
template: hbs`
|
||||
{{#if this.site.desktopView}}
|
||||
{{#if attrs.sidebarEnabled}}
|
||||
@ -15,7 +20,7 @@ createWidget("header-contents", {
|
||||
{{#if attrs.topic}}
|
||||
{{header-topic-info attrs=attrs}}
|
||||
{{else if this.siteSettings.bootstrap_mode_enabled}}
|
||||
{{#if this.currentUser.staff}}
|
||||
{{#if transformed.staff}}
|
||||
{{header-bootstrap-mode attrs=attrs}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user