Skip to content

Commit

Permalink
Fixes compile errors
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Dec 6, 2024
1 parent 9d4ca1e commit b10316e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ public ResourceSharing updateResourceSharingInfo(String resourceId, String sourc
// Atomic operation
// TODO check if this script can be updated to replace magic identifiers (i.e. users, roles and backend_roles) with the ones
// supplied in shareWith
Script updateScript = new Script(ScriptType.INLINE, """
Script updateScript = new Script(ScriptType.INLINE, "painless", """
if (ctx._source.share_with == null) {
ctx._source.share_with = [:];
}
Expand Down Expand Up @@ -745,7 +745,7 @@ public ResourceSharing updateResourceSharingInfo(String resourceId, String sourc
ctx._source.share_with.put(scopeName, newScopeEntry);
}
}
""", "painless", Collections.singletonMap("shareWith", shareWithMap));
""", Collections.singletonMap("shareWith", shareWithMap));

boolean success = updateByQueryResourceSharing(sourceIdx, resourceId, updateScript);
return success ? new ResourceSharing(resourceId, sourceIdx, createdBy, shareWith) : null;
Expand Down

0 comments on commit b10316e

Please sign in to comment.