diff --git a/app/assets/javascripts/admin/components/admin-group-selector.js.es6 b/app/assets/javascripts/admin/components/admin-group-selector.js.es6 index 08bcc619f48..4189beed3f1 100644 --- a/app/assets/javascripts/admin/components/admin-group-selector.js.es6 +++ b/app/assets/javascripts/admin/components/admin-group-selector.js.es6 @@ -21,11 +21,6 @@ export default Ember.Component.extend({ ).findBy("id", evt.removed.id)}); } }.bind(this)); - - Discourse.Group.findAll().then(function(groups){ - this.set("available", groups.filterBy("automatic", false)); - }.bind(this)); - this._refreshOnReset(); }, diff --git a/app/assets/javascripts/admin/routes/admin_user_route.js b/app/assets/javascripts/admin/routes/admin_user_route.js index fd78a5ed6bb..96af282ebcb 100644 --- a/app/assets/javascripts/admin/routes/admin_user_route.js +++ b/app/assets/javascripts/admin/routes/admin_user_route.js @@ -23,6 +23,11 @@ Discourse.AdminUserRoute = Discourse.Route.extend({ afterModel: function(adminUser) { var controller = this.controllerFor('adminUser'); + Discourse.Group.findAll().then(function(groups){ + controller.set("availableGroups", groups.filterBy("automatic", false)); + }.bind(this)); + + return adminUser.loadDetails().then(function () { adminUser.setOriginalTrustLevel(); controller.set('model', adminUser); diff --git a/app/assets/javascripts/admin/templates/user_index.js.handlebars b/app/assets/javascripts/admin/templates/user_index.js.handlebars index fccb6d13a22..22d77122a8d 100644 --- a/app/assets/javascripts/admin/templates/user_index.js.handlebars +++ b/app/assets/javascripts/admin/templates/user_index.js.handlebars @@ -55,7 +55,7 @@
{{i18n admin.groups.title}}
- {{admin-group-selector selected=model.groups }} + {{admin-group-selector selected=model.groups available=availableGroups}}
{{#if custom_groups}}