fix: 🐛 create-without-read case should redirect to index

This commit is contained in:
Randall Morey committed 2021-09-08 13:52:51 -04:00
1 parent f7d3dfdac0
commit c462fa4c51
1 file changed
+5 -1
+5 -1
View File
@@ -57,7 +57,11 @@ export default class ScopesScopeGroupsRoute extends Route {
)
async save(group) {
await group.save();
await this.transitionTo('scopes.scope.groups.group', group);
if (this.can.can('read model', group)) {
await this.transitionTo('scopes.scope.groups.group', group);
} else {
await this.transitionTo('scopes.scope.groups');
}
this.refresh();
}