fix: validate credential ownership in attribute sync update (#28873)

This commit is contained in:
Pedro Castro authored and GitHub committed 2026-04-14 08:29:26 -03:00
1 parent 51e852f671
commit cbb234cb35
3 files changed
+35 -2

No files matched your search

@@ -217,4 +217,11 @@ export class IntegrationAttributeSyncService {
async getAllByCredentialId(credentialId: number) {
return this.deps.integrationAttributeSyncRepository.getAllByCredentialId(credentialId);
}
async validateCredentialBelongsToOrg(credentialId: number, organizationId: number) {
return this.deps.credentialRepository.findByIdAndTeamId({
id: credentialId,
teamId: organizationId,
});
}
}