Merge pull request #747 from hashicorp/feature-create-without-read-redirect

Feature create without read redirect
This commit is contained in:
Randall Morey authored and GitHub committed 2021-09-08 14:06:57 -04:00
commit aa9694cae2
2 files changed
+5 -2

No files matched your search

+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();
}
@@ -71,7 +71,6 @@
as |message|
>
<message.description>
{{t 'resources.group.description'}}
{{#if (can 'list collection' this.scope collection='groups')}}
{{! can list (at least): show default welcome message}}
{{t 'resources.group.description'}}