diff --git a/app/assets/javascripts/admin/routes/admin_user_route.js b/app/assets/javascripts/admin/routes/admin_user_route.js index efef6ddc4c4..5f1d4194059 100644 --- a/app/assets/javascripts/admin/routes/admin_user_route.js +++ b/app/assets/javascripts/admin/routes/admin_user_route.js @@ -25,11 +25,13 @@ Discourse.AdminUserIndexRoute = Discourse.Route.extend({ }, afterModel: function(model) { - var self = this; - return Discourse.Group.findAll().then(function(groups){ - self._availableGroups = groups.filterBy('automatic', false); - return model; - }); + if(Discourse.User.currentProp('admin')) { + var self = this; + return Discourse.Group.findAll().then(function(groups){ + self._availableGroups = groups.filterBy('automatic', false); + return model; + }); + } }, setupController: function(controller, model) { diff --git a/app/assets/javascripts/admin/templates/user_index.js.handlebars b/app/assets/javascripts/admin/templates/user_index.js.handlebars index 22d77122a8d..688b960136f 100644 --- a/app/assets/javascripts/admin/templates/user_index.js.handlebars +++ b/app/assets/javascripts/admin/templates/user_index.js.handlebars @@ -52,6 +52,8 @@ + + {{#if currentUser.admin}}