KyleLin0927 commented on code in PR #7580:
URL: https://github.com/apache/gravitino/pull/7580#discussion_r2197951754


##########
server/src/main/java/org/apache/gravitino/server/web/rest/TopicOperations.java:
##########
@@ -78,6 +87,12 @@ public Response listTopics(
             LOG.info("Listing topics under schema: {}.{}.{}", metalake, 
catalog, schema);
             Namespace topicNS = NamespaceUtil.ofTopic(metalake, catalog, 
schema);
             NameIdentifier[] topics = dispatcher.listTopics(topicNS);
+            topics =
+                MetadataFilterHelper.filterByExpression(
+                    metalake,
+                    "METALAKE::CONSUME_TOPIC || CATALOG::CONSUME_TOPIC || 
SCHEMA::CONSUME_TOPIC || TOPIC::CONSUME_TOPIC || METALAKE::PRODUCE_TOPIC 
||CATALOG::PRODUCE_TOPIC || SCHEMA::PRODUCE_TOPIC || TOPIC::PRODUCE_TOPIC || 
METALAKE::OWNERSHIP || CATALOG::OWNERSHIP || SCHEMA::OWNERSHIP || 
TOPIC::OWNERSHIP",

Review Comment:
   fixed



##########
server/src/main/java/org/apache/gravitino/server/web/rest/TopicOperations.java:
##########
@@ -66,10 +71,14 @@ public TopicOperations(TopicDispatcher dispatcher) {
   @GET
   @Produces("application/vnd.gravitino.v1+json")
   @Timed(name = "list-topic." + MetricNames.HTTP_PROCESS_DURATION, absolute = 
true)
+  @ResponseMetered(name = "list-topic", absolute = true)
   public Response listTopics(
-      @PathParam("metalake") String metalake,
-      @PathParam("catalog") String catalog,
-      @PathParam("schema") String schema) {
+      @PathParam("metalake") @AuthorizationMetadata(type = 
MetadataObject.Type.METALAKE)
+          String metalake,
+      @PathParam("catalog") @AuthorizationMetadata(type = 
MetadataObject.Type.CATALOG)
+          String catalog,
+      @PathParam("schema") @AuthorizationMetadata(type = 
MetadataObject.Type.SCHEMA)
+          String schema) {

Review Comment:
   fixed



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