Ensure org domain removal from the IDP is properly propagated to the DB

Closes #29599

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
This commit is contained in:
Stefan Guilhen 2024-05-16 09:25:31 -03:00 committed by Pedro Igor
parent 35df0140ee
commit 553b1ce695

View file

@ -155,6 +155,7 @@ public final class OrganizationAdapter implements OrganizationModel, JpaModel<Or
idps.forEach(idp -> {
if (Objects.equals(domainEntity.getName(), idp.getConfig().get(ORGANIZATION_DOMAIN_ATTRIBUTE))) {
idp.getConfig().remove(ORGANIZATION_DOMAIN_ATTRIBUTE);
realm.updateIdentityProvider(idp);
}
});
}