mirror of
https://github.com/discourse/discourse.git
synced 2025-01-26 15:50:44 +08:00
24 lines
556 B
JavaScript
24 lines
556 B
JavaScript
export default Discourse.Route.extend({
|
|
titleToken() {
|
|
return I18n.t('groups.manage.title');
|
|
},
|
|
|
|
model() {
|
|
return this.modelFor('group');
|
|
},
|
|
|
|
afterModel(group) {
|
|
if (!this.currentUser ||
|
|
!(this.currentUser.admin && group.get('automatic')) &&
|
|
!this.currentUser.canManageGroup(group)) {
|
|
|
|
this.transitionTo("group.members", group);
|
|
}
|
|
},
|
|
|
|
setupController(controller, model) {
|
|
this.controllerFor('group-manage').setProperties({ model });
|
|
this.controllerFor("group").set("showing", 'manage');
|
|
},
|
|
});
|