Redirect to group members tab if user cannot see messages tab.
This commit is contained in:
parent
aa91bd61a7
commit
19d6b9cb36
|
@ -2,4 +2,14 @@ export default Discourse.Route.extend({
|
|||
titleToken() {
|
||||
return I18n.t('groups.messages');
|
||||
},
|
||||
|
||||
model() {
|
||||
return this.modelFor('group');
|
||||
},
|
||||
|
||||
afterModel(group) {
|
||||
if (!group.get('is_group_user') || !(this.currentUser && this.currentUser.admin)) {
|
||||
this.transitionTo("group.members", group);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue