mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-06-27 04:22:05 +00:00
Scim Bot can update display name
This commit is contained in:
parent
b7fff25a2d
commit
b65085d758
@ -3339,7 +3339,10 @@ public abstract class EntityRepository<T extends EntityInterface> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateDisplayName() {
|
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
|
// Revert change to non-empty displayName if it is being updated by a bot
|
||||||
updated.setDisplayName(original.getDisplayName());
|
updated.setDisplayName(original.getDisplayName());
|
||||||
return;
|
return;
|
||||||
@ -4125,6 +4128,10 @@ public abstract class EntityRepository<T extends EntityInterface> {
|
|||||||
daoCollection.entityExtensionDAO().getExtension(original.getId(), extensionName);
|
daoCollection.entityExtensionDAO().getExtension(original.getId(), extensionName);
|
||||||
return JsonUtils.readValue(json, entityClass);
|
return JsonUtils.readValue(json, entityClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isNotScimBot() {
|
||||||
|
return !"scim-bot".equalsIgnoreCase(this.updatingUser.getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user