KyleLin0927 commented on code in PR #7580: URL: https://github.com/apache/gravitino/pull/7580#discussion_r2197951219
########## server/src/main/java/org/apache/gravitino/server/web/rest/TopicOperations.java: ########## @@ -92,10 +107,16 @@ public Response listTopics( @Produces("application/vnd.gravitino.v1+json") @Timed(name = "create-topic." + MetricNames.HTTP_PROCESS_DURATION, absolute = true) @ResponseMetered(name = "create-topic", absolute = true) + @AuthorizationExpression( + expression = + "METALAKE::CREATE_TOPIC || CATALOG::CREATE_TOPIC || SCHEMA::CREATE_TOPIC || METALAKE::OWNER || CATALOG::OWNER || SCHEMA::OWNER", Review Comment: fixed ########## 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: ########## @@ -133,11 +154,17 @@ public Response createTopic( @Produces("application/vnd.gravitino.v1+json") @Timed(name = "load-topic." + MetricNames.HTTP_PROCESS_DURATION, absolute = true) @ResponseMetered(name = "load-topic", absolute = true) + @AuthorizationExpression( + expression = + "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 -- 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: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org