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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:
##########
@@ -283,14 +283,6 @@ protected void internalGrantPermissionsOnTopic(String 
role, Set<AuthAction> acti
         validateAdminAccessForTenant(namespaceName.getTenant());
         validatePoliciesReadOnlyAccess();
 
-        PartitionedTopicMetadata meta = getPartitionedTopicMetadata(topicName, 
true, false);
-        int numPartitions = meta.partitions;
-        if (numPartitions > 0) {
-            for (int i = 0; i < numPartitions; i++) {
-                TopicName topicNamePartition = topicName.getPartition(i);
-                grantPermissions(topicNamePartition.toString(), role, actions);
-            }
-        }
         grantPermissions(topicName.toString(), role, actions);

Review Comment:
   ```suggestion
           grantPermissions(topicName.getPartitionedTopicName(), role, actions);
   ```



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