REFACTOR: admin-user-index route (#7534)

REFACTOR: admin-user-index route (#7534)

diff --git a/app/assets/javascripts/admin/routes/admin-user-index.js.es6 b/app/assets/javascripts/admin/routes/admin-user-index.js.es6
index 6767e09..2b623db 100644
--- a/app/assets/javascripts/admin/routes/admin-user-index.js.es6
+++ b/app/assets/javascripts/admin/routes/admin-user-index.js.es6
@@ -6,10 +6,9 @@ export default Discourse.Route.extend({
   },
 
   afterModel(model) {
-    if (this.currentUser.get("admin")) {
-      const self = this;
-      return Group.findAll().then(function(groups) {
-        self._availableGroups = groups.filterBy("automatic", false);
+    if (this.currentUser.admin) {
+      return Group.findAll().then(groups => {
+        this._availableGroups = groups.filterBy("automatic", false);
         return model;
       });
     }
@@ -17,7 +16,7 @@ export default Discourse.Route.extend({
 
   setupController(controller, model) {
     controller.setProperties({
-      originalPrimaryGroupId: model.get("primary_group_id"),
+      originalPrimaryGroupId: model.primary_group_id,
       availableGroups: this._availableGroups,
       customGroupIdsBuffer: null,
       model

GitHub sha: b8db702a