Icu 6153 unknown credential support (#1344)
* feat: 🎸 Add support for unknown credential types ✅ Closes: ICU-6153 * fix: 🐛 add unknown cred type * refactor: 💡 move credential type logic to a component * chore: 🤖 fix component name * fix: 🐛 update component name, remove unused translated string * fix: 🐛 file name Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
This commit is contained in:
1 parent
6aec408003
commit
5224512da0
18 files changed
+174
-80
No files matched your search
@@ -7,4 +7,27 @@ export const options = {
|
||||
http_method: ['GET', 'POST'],
|
||||
};
|
||||
|
||||
export default class CredentialLibraryModel extends GeneratedCredentialLibraryModel {}
|
||||
/**
|
||||
* Supported Credential Library types.
|
||||
*/
|
||||
export const types = ['vault'];
|
||||
|
||||
export default class CredentialLibraryModel extends GeneratedCredentialLibraryModel {
|
||||
// =attributes
|
||||
|
||||
/**
|
||||
* True if credential is an unknown type.
|
||||
* @type {boolean}
|
||||
*/
|
||||
get isUnknown() {
|
||||
return !types.includes(this.type);
|
||||
}
|
||||
|
||||
/**
|
||||
* True if credential is a vault type.
|
||||
* @type {boolean}
|
||||
*/
|
||||
get isVault() {
|
||||
return this.type === 'vault';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user