mirror of
https://github.com/discourse/discourse.git
synced 2025-05-01 16:44:52 +08: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", {
|
createWidget("header-contents", {
|
||||||
tagName: "div.contents.clearfix",
|
tagName: "div.contents.clearfix",
|
||||||
|
transform() {
|
||||||
|
return {
|
||||||
|
staff: this.get("currentUser.staff"),
|
||||||
|
};
|
||||||
|
},
|
||||||
template: hbs`
|
template: hbs`
|
||||||
{{#if this.site.desktopView}}
|
{{#if this.site.desktopView}}
|
||||||
{{#if attrs.sidebarEnabled}}
|
{{#if attrs.sidebarEnabled}}
|
||||||
@ -15,7 +20,7 @@ createWidget("header-contents", {
|
|||||||
{{#if attrs.topic}}
|
{{#if attrs.topic}}
|
||||||
{{header-topic-info attrs=attrs}}
|
{{header-topic-info attrs=attrs}}
|
||||||
{{else if this.siteSettings.bootstrap_mode_enabled}}
|
{{else if this.siteSettings.bootstrap_mode_enabled}}
|
||||||
{{#if this.currentUser.staff}}
|
{{#if transformed.staff}}
|
||||||
{{header-bootstrap-mode attrs=attrs}}
|
{{header-bootstrap-mode attrs=attrs}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user