feat: 🎸 Read a credential store (#1193)

This change includes making static type credential stores clickable when
listing all credential stores, along with view the individual credential
store.

✅ Closes: ICU-5173
This commit is contained in:
lisbet-alvarez authored and GitHub committed 2022-07-15 12:39:45 -07:00
1 parent ed7e24b328
commit b18f21e6f9
2 files changed
+9 -2

No files matched your search

@@ -1,9 +1,13 @@
import ModelAbility from './model';
import { inject as service } from '@ember/service';
/**
* Provides abilities for credential store.
*/
export default class CredentialStoreAbility extends ModelAbility {
// =services
@service features;
// =permissions
/**
@@ -11,6 +15,8 @@ export default class CredentialStoreAbility extends ModelAbility {
* @type {boolean}
*/
get canRead() {
return !this.model.isStatic && this.hasAuthorizedAction('read');
return this.features.isEnabled('static-credentials')
? this.hasAuthorizedAction('read')
: !this.model.isStatic && this.hasAuthorizedAction('read');
}
}
@@ -321,6 +321,7 @@ credential-store:
static: Static
help:
vault: The host details are brokered by a Vault server.
static: This host uses static credentials, such as a username and password or key pair.
form:
address:
label: Address