jarredhj0214 commented on code in PR #12482:
URL: https://github.com/apache/gravitino/pull/12482#discussion_r3827871768
##########
server-common/src/main/java/org/apache/gravitino/server/authorization/expression/AuthorizationExpressionConstants.java:
##########
@@ -40,6 +40,20 @@ public class AuthorizationExpressionConstants {
ANY_USE_CATALOG && ANY_USE_SCHEMA && (TABLE::OWNER ||
ANY_SELECT_TABLE || ANY_MODIFY_TABLE)
""";
+ public static final String PROBE_TABLE_LIKE_AUTHORIZATION_EXPRESSION =
+ """
+ ANY_USE_CATALOG && ANY_USE_SCHEMA &&
+ (ANY_PROBE_TABLE_LIKE || ANY_SELECT_TABLE ||
ANY_MODIFY_TABLE ||
+ ANY_CREATE_TABLE || ANY_CREATE_VIEW)
+ """;
+
+ public static final String LIST_TABLE_LIKE_AUTHORIZATION_EXPRESSION =
+ """
+ ANY(OWNER, METALAKE, CATALOG, SCHEMA, TABLE) ||
+ ANY_USE_CATALOG && ANY_USE_SCHEMA &&
+ (ANY_PROBE_TABLE_LIKE || ANY_SELECT_TABLE ||
ANY_MODIFY_TABLE)
Review Comment:
> You should include `ANY_CREATE_TABLE || ANY_CREATE_VIEW`, too.
Updated, thanks. I added ANY_CREATE_TABLE || ANY_CREATE_VIEW to the list
table-like expression and adjusted the authorization IT expectation
accordingly. Please take another look.
--
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]