From 0181f22c700bb0b10b373f111bc5b3b216cfd586 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 6 Jun 2016 16:04:24 -0400 Subject: [PATCH] hide tags-admin-dropdown unless you are staff --- .../javascripts/discourse/controllers/tags-index.js.es6 | 2 ++ app/assets/javascripts/discourse/templates/tags/index.hbs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/controllers/tags-index.js.es6 b/app/assets/javascripts/discourse/controllers/tags-index.js.es6 index 8f2ee7ce7..07a9da7cf 100644 --- a/app/assets/javascripts/discourse/controllers/tags-index.js.es6 +++ b/app/assets/javascripts/discourse/controllers/tags-index.js.es6 @@ -1,6 +1,8 @@ export default Ember.Controller.extend({ sortProperties: ['count:desc', 'id'], + canAdminTags: Ember.computed.alias("currentUser.staff"), + actions: { sortByCount() { this.set('sortProperties', ['count:desc', 'id']); diff --git a/app/assets/javascripts/discourse/templates/tags/index.hbs b/app/assets/javascripts/discourse/templates/tags/index.hbs index 6a31bfdf4..1cf1beb97 100644 --- a/app/assets/javascripts/discourse/templates/tags/index.hbs +++ b/app/assets/javascripts/discourse/templates/tags/index.hbs @@ -4,7 +4,9 @@
- {{tags-admin-dropdown}} + {{#if canAdminTags}} + {{tags-admin-dropdown}} + {{/if}}

{{i18n "tagging.tags"}}