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
3694bf48ca
commit
87705e37eb
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user