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. Similar APIs
might accept a column type as input. I believe that when the input type is
"column," the caller should have the corresponding table-level permission to
access it.
--
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]