Skip to content

Commit

Permalink
Fixed encrypted properties in the credential after update entity
Browse files Browse the repository at this point in the history
  • Loading branch information
holashchand committed Jul 8, 2024
1 parent 3100322 commit 78e09f9
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,6 @@ private void generateCredentials(JsonNode rootNode, JsonNode inputNode, String v
public void updateEntity(Shard shard, String userId, String id, String jsonString, boolean skipSignature) throws Exception {
JsonNode inputNode = objectMapper.readTree(jsonString);
String entityType = inputNode.fields().next().getKey();
if (encryptionEnabled) {
inputNode = encryptionHelper.getEncryptedJson(inputNode);
}
systemFieldsHelper.ensureUpdateAuditFields(entityType, inputNode.get(entityType), userId);

DatabaseProvider databaseProvider = shard.getDatabaseProvider();
Expand Down Expand Up @@ -369,6 +366,10 @@ public void updateEntity(Shard shard, String userId, String id, String jsonStrin
generateCredentials(mergedNode, inputNode, entityType);
}

if (encryptionEnabled) {
inputNode = encryptionHelper.getEncryptedJson(inputNode);
}

if (entityType.equals(Schema)) {
schemaService.validateUpdateSchema(readNode, mergedNode);
}
Expand Down

0 comments on commit 78e09f9

Please sign in to comment.