RobertIndie commented on code in PR #15571:
URL: https://github.com/apache/pulsar/pull/15571#discussion_r882300287


##########
pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarMetadata.java:
##########
@@ -273,14 +278,24 @@ public Map<SchemaTableName, List<ColumnMetadata>> 
listTableColumns(ConnectorSess
         return columns.build();
     }
 
-    private ConnectorTableMetadata getTableMetadata(SchemaTableName 
schemaTableName, boolean withInternalColumns) {
+    @Override
+    public void cleanupQuery(ConnectorSession session) {
+        if (pulsarConnectorConfig.getAuthorizationEnable()) {
+            pulsarAuth.cleanSession(session);
+        }
+    }
+
+    private ConnectorTableMetadata getTableMetadata(ConnectorSession session, 
SchemaTableName schemaTableName,
+                                                    boolean 
withInternalColumns) {
 
         if (schemaTableName.getSchemaName().equals(INFORMATION_SCHEMA)) {
             return null;
         }
 
         TopicName topicName = getMatchedTopicName(schemaTableName);
 
+        checkTopicAuthorization(session, topicName.toString());

Review Comment:
   There is an interface method `getTableHandle` that doesn't go through the 
`getTableMetadata` method. So I added an auth check to the `getTableHandle`



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