hdygxsj commented on code in PR #7581:
URL: https://github.com/apache/gravitino/pull/7581#discussion_r2189091550


##########
server/src/main/java/org/apache/gravitino/server/web/rest/FilesetOperations.java:
##########
@@ -168,6 +186,15 @@ public Response createFileset(
   @Produces("application/vnd.gravitino.v1+json")
   @Timed(name = "load-fileset." + MetricNames.HTTP_PROCESS_DURATION, absolute 
= true)
   @ResponseMetered(name = "load-fileset", absolute = true)
+  @AuthorizationExpression(
+      expression =
+          "METALAKE::READ_FILESET || CATALOG::READ_FILESET "
+              + "|| SCHEMA::READ_FILESET || FILESET::READ_FILESET "

Review Comment:
   Please use any expression like 
ANY(SELECT_TABLE,METALAKE,CATALOG,SCHEMA,TABLE)
   
   Please refer to https://github.com/apache/gravitino/pull/7577/files



##########
server/src/main/java/org/apache/gravitino/server/web/rest/FilesetOperations.java:
##########
@@ -98,6 +102,17 @@ public Response listFilesets(
           () -> {
             Namespace filesetNS = NamespaceUtil.ofFileset(metalake, catalog, 
schema);
             NameIdentifier[] idents = dispatcher.listFilesets(filesetNS);
+            idents =
+                MetadataFilterHelper.filterByExpression(
+                    metalake,
+                    "METALAKE::READ_FILESET || CATALOG::READ_FILESET "

Review Comment:
   Please use any expression like 
ANY(SELECT_TABLE,METALAKE,CATALOG,SCHEMA,TABLE)
   
   Please refer to https://github.com/apache/gravitino/pull/7577/files



##########
server/src/main/java/org/apache/gravitino/server/web/rest/FilesetOperations.java:
##########
@@ -308,6 +345,15 @@ public Response dropFileset(
   @Produces("application/vnd.gravitino.v1+json")
   @Timed(name = "get-file-location." + MetricNames.HTTP_PROCESS_DURATION, 
absolute = true)
   @ResponseMetered(name = "get-file-location", absolute = true)
+  @AuthorizationExpression(
+      expression =
+          "METALAKE::READ_FILESET || CATALOG::READ_FILESET "

Review Comment:
   Please use any expression like 
ANY(SELECT_TABLE,METALAKE,CATALOG,SCHEMA,TABLE)
   
   Please refer to https://github.com/apache/gravitino/pull/7577/files



-- 
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]

Reply via email to