Scim Bot can update display name

This commit is contained in:
aji-aju 2025-06-20 18:14:34 +05:30 committed by Sriharsha Chintalapani
parent 3694bf48ca
commit 87705e37eb

View File

@ -3339,7 +3339,10 @@ public abstract class EntityRepository<T extends EntityInterface> {
}
private void updateDisplayName() {
if (operation.isPut() && !nullOrEmpty(original.getDisplayName()) && updatedByBot()) {
if (operation.isPut()
&& !nullOrEmpty(original.getDisplayName())
&& updatedByBot()
&& isNotScimBot()) {
// Revert change to non-empty displayName if it is being updated by a bot
updated.setDisplayName(original.getDisplayName());
return;
@ -4125,6 +4128,10 @@ public abstract class EntityRepository<T extends EntityInterface> {
daoCollection.entityExtensionDAO().getExtension(original.getId(), extensionName);
return JsonUtils.readValue(json, entityClass);
}
private boolean isNotScimBot() {
return !"scim-bot".equalsIgnoreCase(this.updatingUser.getName());
}
}
/**