nodece commented on code in PR #16792:
URL: https://github.com/apache/pulsar/pull/16792#discussion_r937507456


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java:
##########
@@ -392,23 +392,6 @@ public CompletableFuture<Boolean> 
checkPermission(TopicName topicName, String ro
                                 return true;
                             }
                         }
-

Review Comment:
   You cannot remove this code, we need to do compatibility here. For the old 
version, we grant the permissions for each partitioned topic name, right now we 
only grant the permissions for the base partitioned topic name.
   
   You should check whether the topic is a partitioned topic. If true, we need 
to check the permissions by the full name of each partition topic.
   
   Assume the `persistent://my-tenant/my-namespace/my-topic` is partitioned 
topic, and has two partition:
   
   - `persistent://my-tenant/my-namespace/my-topic-partition-0`
   - `persistent://my-tenant/my-namespace/my-topic-partition-1`
   
   You first need to get the full name of each partition topic, then check the 
permissions of these topic names.



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