FIX: moderators had no access to admin user page
This commit is contained in:
parent
32cea9d8cc
commit
f9162d6add
|
@ -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) {
|
||||
|
|
|
@ -52,6 +52,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{#if currentUser.admin}}
|
||||
<div class='display-row'>
|
||||
<div class='field'>{{i18n admin.groups.title}}</div>
|
||||
<div class='value'>
|
||||
|
@ -68,6 +70,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class='display-row'>
|
||||
<div class='field'>{{i18n user.ip_address.title}}</div>
|
||||
|
|
Loading…
Reference in New Issue