fix: 🐛 Update vault-ldap cred library (#3000)

* fix: 🐛 remove UPD cred type from vault-ldap

* fix: 🐛 failing tests

* fix: 🐛 remove log
This commit is contained in:
Priya Patel authored and GitHub committed 2025-10-02 12:08:25 -05:00
1 parent 396bf0a43f
commit b4f3741979
9 files changed
+27 -149

No files matched your search

@@ -76,13 +76,13 @@ export default class GeneratedCredentialLibraryModel extends BaseModel {
path;
@attr('string', {
for: ['vault-generic', 'vault-ldap'],
for: 'vault-generic',
description: 'It indicates the type of credential the library returns.',
})
credential_type;
@attr('object-as-array', {
for: ['vault-generic', 'vault-ldap'],
for: 'vault-generic',
description: 'It indicates the credential mapping overrides.',
})
credential_mapping_overrides;
@@ -7,7 +7,6 @@ import ApplicationSerializer from './application';
import {
TYPE_CREDENTIAL_LIBRARY_VAULT_GENERIC,
TYPE_CREDENTIAL_LIBRARY_VAULT_SSH_CERTIFICATE,
TYPE_CREDENTIAL_LIBRARY_VAULT_LDAP,
options,
} from '../models/credential-library';
@@ -30,8 +29,6 @@ export default class CredentialLibrarySerializer extends ApplicationSerializer {
return this.serializeVaultGeneric(...arguments);
case TYPE_CREDENTIAL_LIBRARY_VAULT_SSH_CERTIFICATE:
return this.serializeVaultSshCertificate(...arguments);
case TYPE_CREDENTIAL_LIBRARY_VAULT_LDAP:
return this.serializeVaultLdap(...arguments);
default:
return super.serialize(...arguments);
}
@@ -64,15 +61,6 @@ export default class CredentialLibrarySerializer extends ApplicationSerializer {
}
}
serializeVaultLdap(snapshot) {
const { isNew } = snapshot;
const serialized = super.serialize(...arguments);
if (serialized.attributes) {
this.handleCredentialMappingOverrides(serialized, isNew);
return serialized;
}
}
/**
* Handle credential mapping overrides for serialization.
* @param {Object} serialized - The serialized object.