diff --git a/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries.js b/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries.js index 06748f330..d38d9a2f9 100644 --- a/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries.js +++ b/ui/admin/app/routes/scopes/scope/credential-stores/credential-store/credential-libraries.js @@ -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(); }