xunliu commented on code in PR #5629:
URL: https://github.com/apache/gravitino/pull/5629#discussion_r1858252323
##########
authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerHelper.java:
##########
@@ -376,6 +425,8 @@ protected void updatePolicyOwner(RangerPolicy policy, Owner
preOwner, Owner newO
} else {
policyItem.getGroups().add(newOwner.name());
}
+ // mark the policy item is created by Gravitino
+ policyItem.getRoles().add(GRAVITINO_PLACEHOLDER_OWNER_ROLE);
Review Comment:
Maybe we need to add judgment?
```
if (!policyItem. getRoles().contains(GRAVITINO_PLACEHOLDER_OWNER_ROLE)) {
policyItem.getRoles().add(GRAVITINO_PLACEHOLDER_OWNER_ROLE);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]