jerryshao commented on code in PR #9384:
URL: https://github.com/apache/gravitino/pull/9384#discussion_r2596861675
##########
core/src/main/java/org/apache/gravitino/authorization/PermissionManager.java:
##########
@@ -638,6 +638,19 @@ private static SecurableObject
updateRevokedSecurableObject(
updatePrivileges.addAll(targetObject.privileges());
privileges.forEach(updatePrivileges::remove);
+ // Remove model privileges if exists
+ for (Privilege privilege : privileges) {
+ if (privilege.name() == Privilege.Name.CREATE_MODEL
+ || privilege.name() == Privilege.Name.CREATE_MODEL_VERSION) {
+ updatePrivileges.remove(
+ AuthorizationUtils.replaceLegacyPrivilege(privilege.name(),
privilege.condition()));
+ } else if (privilege.name() == Privilege.Name.REGISTER_MODEL
+ || privilege.name() == Privilege.Name.LINK_MODEL_VERSION) {
+ updatePrivileges.remove(
+ AuthorizationUtils.getLegacyPrivilege(privilege.name(),
privilege.condition()));
+ }
+ }
Review Comment:
What is the meaning of this code, can you explain more?
--
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]