jerqi commented on code in PR #5021:
URL: https://github.com/apache/gravitino/pull/5021#discussion_r1792698008
##########
core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java:
##########
@@ -265,14 +268,26 @@ public static void checkSecurableObject(String metalake,
MetadataObject object)
}
}
+ public static void checkDuplicatedNamePrivilege(Collection<Privilege>
privileges) {
+ Set<Privilege.Name> privilegeNameSet = Sets.newHashSet();
+ for (Privilege privilege : privileges) {
+ if (privilegeNameSet.contains(privilege.name())) {
+ throw new IllegalPrivilegeException(
+ "Doesn't support duplicated privilege name %s with different
condition",
Review Comment:
This should be unnecessary. It will be allow and deny the privilege name.
--
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]