Merge pull request #750 from hashicorp/chore-create-without-read-cred-lib

Chore create without read cred lib
This commit is contained in:
Susmitha Girumala authored and GitHub committed 2021-09-08 14:58:10 -04:00
commit f705a386f0
1 file changed
+10 -4
@@ -55,10 +55,16 @@ export default class ScopesScopeCredentialStoresCredentialStoreCredentialLibrari
)
async save(credentialLibrary) {
await credentialLibrary.save();
await this.transitionTo(
'scopes.scope.credential-stores.credential-store.credential-libraries.credential-library',
credentialLibrary
);
if (this.can.can('read model', credentialLibrary)) {
await this.transitionTo(
'scopes.scope.credential-stores.credential-store.credential-libraries.credential-library',
credentialLibrary
);
} else {
await this.transitionTo(
'scopes.scope.credential-stores.credential-store.credential-libraries'
);
}
this.refresh();
}