mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: prevents staff computed property to be overridden (#7931)
This commit is contained in:
@ -53,7 +53,7 @@ widgetTest("staff menu", {
|
||||
|
||||
beforeEach() {
|
||||
this.currentUser.setProperties({
|
||||
staff: true,
|
||||
moderator: true,
|
||||
reviewable_count: 3
|
||||
});
|
||||
},
|
||||
@ -70,7 +70,7 @@ widgetTest("staff menu - admin", {
|
||||
template: '{{mount-widget widget="hamburger-menu"}}',
|
||||
|
||||
beforeEach() {
|
||||
this.currentUser.setProperties({ staff: true, admin: true });
|
||||
this.currentUser.setProperties({ admin: true });
|
||||
},
|
||||
|
||||
test(assert) {
|
||||
@ -83,7 +83,7 @@ widgetTest("reviewable content", {
|
||||
|
||||
beforeEach() {
|
||||
this.currentUser.setProperties({
|
||||
staff: true,
|
||||
moderator: true,
|
||||
reviewable_count: 5
|
||||
});
|
||||
},
|
||||
|
@ -579,7 +579,7 @@ widgetTest("toggle moderator post", {
|
||||
template:
|
||||
'{{mount-widget widget="post" args=args togglePostType=(action "togglePostType")}}',
|
||||
beforeEach() {
|
||||
this.currentUser.set("staff", true);
|
||||
this.currentUser.set("moderator", true);
|
||||
this.set("args", { canManage: true });
|
||||
this.on("togglePostType", () => (this.toggled = true));
|
||||
},
|
||||
@ -595,7 +595,7 @@ widgetTest("toggle moderator post", {
|
||||
template:
|
||||
'{{mount-widget widget="post" args=args togglePostType=(action "togglePostType")}}',
|
||||
beforeEach() {
|
||||
this.currentUser.set("staff", true);
|
||||
this.currentUser.set("moderator", true);
|
||||
this.set("args", { canManage: true });
|
||||
this.on("togglePostType", () => (this.toggled = true));
|
||||
},
|
||||
|
Reference in New Issue
Block a user