hdygxsj commented on code in PR #9372:
URL: https://github.com/apache/gravitino/pull/9372#discussion_r2588636430
##########
server-common/src/main/java/org/apache/gravitino/server/authorization/expression/AuthorizationExpressionConverter.java:
##########
@@ -164,24 +170,32 @@ public static String
replaceCanAccessMetadataPrivilege(String expression) {
"""
( entityType == 'CATALOG' && (%s)) ||
( entityType == 'SCHEMA' && (%s)) ||
- ( entityType == 'TABLE' && (%s)) ||
+ ( entityType == 'TABLE' && (%s)) ||
( entityType == 'MODEL' && (%s)) ||
( entityType == 'FILESET' && (%s)) ||
( entityType == 'TOPIC' && (%s)) ||
- ( entityType != 'CATALOG' &&
- entityType != 'SCHEMA' &&
- entityType != 'TABLE' &&
- entityType != 'MODEL' &&
- entityType != 'FILESET' &&
- entityType != 'TOPIC')
+ ( entityType == 'ROLE' && (%s)) ||
+ ( entityType == 'METALAKE' && (%s)) ||
+ ( entityType == 'POLICY' && (%s)) ||
+ ( entityType == 'TAG' && (%s)) ||
+ ( entityType == 'JOB' && (%s)) ||
+ ( entityType == 'JOB_TEMPLATE' && (%s)) ||
+ ( entityType == 'COLUMN' && (%s))
Review Comment:
CAN_ACCESS_METADATA isn't used solely for the getOwner API. Some APIs might
accept a column type as input. I believe that when the input type is "column,"
the caller should have the load table permission to access it.
<img width="907" height="470" alt="image"
src="https://github.com/user-attachments/assets/e9b8098d-a516-40dd-906f-212e4c4a915d"
/>
--
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]