Merge pull request #748 from hashicorp/chore-create-without-read-account

chore: 🤖 redirect to index on save in create-without-read case
This commit is contained in:
Susmitha Girumala authored and GitHub committed 2021-09-08 14:33:31 -04:00
commit d5bf053b41
1 file changed
+8 -4
@@ -60,10 +60,14 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsRoute extends Route
adapterOptions.password = password;
}
await account.save({ adapterOptions });
await this.transitionTo(
'scopes.scope.auth-methods.auth-method.accounts.account',
account
);
if (this.can.can('read model', account)) {
await this.transitionTo(
'scopes.scope.auth-methods.auth-method.accounts.account',
account
);
} else {
await this.transitionTo('scopes.scope.auth-methods.auth-method.accounts');
}
this.refresh();
}