* feat: 🎸 Update models for vault ssh cert feature (#1591) ✅ Closes: ICU-7546 * feat: 🎸 Setup types in cred library forms and use HDS component (#1597) * feat: 🎸 Setup types in cred library forms and use HDS component ✅ Closes: ICU-7673 * feat: 🎸 Add vault ssh cert type for credential library (#1608) * feat: 🎸 Add vault ssh cert type for credential library ✅ Closes: ICU-7678 * feat: 🎸 Enable feature flag for vault ssh cert work (#1614) * fix: 🐛 Change fields to optional as they get default by backend (#1615) * Chore/cleanup vault ssh cert (#1616)
21 lines
673 B
JavaScript
21 lines
673 B
JavaScript
import CredentialLibraryAbility from 'api/abilities/credential-library';
|
|
import { inject as service } from '@ember/service';
|
|
|
|
export default class OverrideCredentialLibraryAbility extends CredentialLibraryAbility {
|
|
// =service
|
|
@service features;
|
|
|
|
/**
|
|
* This override ensures that vault ssh cert may be read only if the
|
|
* credential-library-vault-ssh-certificate feature flag is enabled.
|
|
* All other types are subject to the standard logic found in the api addon.
|
|
*/
|
|
get canRead() {
|
|
return this.features.isEnabled(
|
|
'credential-library-vault-ssh-certificate'
|
|
) || !this.model.isVaultSSHCertificate
|
|
? super.canRead
|
|
: false;
|
|
}
|
|
}
|