2015-01-22 03:52:48 +08:00
|
|
|
export default Discourse.Route.extend({
|
2014-04-24 01:25:02 +08:00
|
|
|
|
|
|
|
model: function(params) {
|
2015-01-22 03:52:48 +08:00
|
|
|
var groups = this.modelFor('adminGroupsType'),
|
2014-04-24 01:25:02 +08:00
|
|
|
group = groups.findProperty('name', params.name);
|
|
|
|
|
|
|
|
if (!group) { return this.transitionTo('adminGroups.index'); }
|
2015-01-22 03:52:48 +08:00
|
|
|
|
2014-04-24 01:25:02 +08:00
|
|
|
return group;
|
|
|
|
},
|
|
|
|
|
|
|
|
setupController: function(controller, model) {
|
2015-01-06 01:51:45 +08:00
|
|
|
controller.set("model", model);
|
2015-01-22 03:52:48 +08:00
|
|
|
// clear the user selector
|
|
|
|
controller.set("usernames", null);
|
|
|
|
// load the members of the group
|
2015-01-06 01:51:45 +08:00
|
|
|
model.findMembers();
|
2014-04-24 01:25:02 +08:00
|
|
|
}
|
2015-01-06 01:51:45 +08:00
|
|
|
|
2014-04-24 01:25:02 +08:00
|
|
|
});
|