mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
DEV: attemps to limit Discourse.User.current() usage (#7943)
This commit is contained in:
@ -191,10 +191,9 @@ export default DropdownSelectBoxComponent.extend({
|
||||
});
|
||||
}
|
||||
|
||||
const currentUser = Discourse.User.current();
|
||||
const showToggleTopicBump =
|
||||
currentUser &&
|
||||
(currentUser.get("staff") || currentUser.trust_level === 4);
|
||||
this.get("currentUser.staff") ||
|
||||
this.get("currentUser.trust_level") === 4;
|
||||
|
||||
if (action === REPLY && showToggleTopicBump) {
|
||||
items.push({
|
||||
|
Reference in New Issue
Block a user