diff --git a/addons/api/addon/abilities/credential-store.js b/addons/api/addon/abilities/credential-store.js index 9b31cfdca..f6cdc1ea8 100644 --- a/addons/api/addon/abilities/credential-store.js +++ b/addons/api/addon/abilities/credential-store.js @@ -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'); } } diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index b8076beb2..a0387018b 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -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