diff --git a/app/assets/javascripts/discourse/controllers/preferences/users.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/users.js.es6 index 03d765eeb6a..4bb9a8885e4 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/users.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/users.js.es6 @@ -6,6 +6,8 @@ import User from "discourse/models/user"; export default Ember.Controller.extend(PreferencesTabController, { saveAttrNames: ["muted_usernames", "ignored_usernames"], ignoredUsernames: Ember.computed.alias("model.ignored_usernames"), + userIsMemberOrAbove: Ember.computed.gte("model.trust_level", 2), + ignoredEnabled: Ember.computed.or("userIsMemberOrAbove", "model.staff"), actions: { ignoredUsernamesChanged(previous, current) { if (current.length > previous.length) { diff --git a/app/assets/javascripts/discourse/templates/preferences/users.hbs b/app/assets/javascripts/discourse/templates/preferences/users.hbs index 7a89a353077..07b31099238 100644 --- a/app/assets/javascripts/discourse/templates/preferences/users.hbs +++ b/app/assets/javascripts/discourse/templates/preferences/users.hbs @@ -6,14 +6,16 @@
{{i18n 'user.muted_users_instructions'}}
-
- - {{user-selector excludeCurrentUser=true - usernames=model.ignored_usernames - onChangeCallback=(action "ignoredUsernamesChanged") - class="user-selector"}} -
-
{{i18n 'user.ignored_users_instructions'}}
+ {{#if ignoredEnabled}} +
+ + {{user-selector excludeCurrentUser=true + usernames=model.ignored_usernames + onChangeCallback=(action "ignoredUsernamesChanged") + class="user-selector"}} +
+
{{i18n 'user.ignored_users_instructions'}}
+ {{/if}} {{plugin-outlet name="user-preferences-notifications" args=(hash model=model save=(action "save"))}}