yuruguo commented on code in PR #17337:
URL: https://github.com/apache/pulsar/pull/17337#discussion_r958270130


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:
##########
@@ -655,6 +655,57 @@ public void updatePropertiesFailed(ManagedLedgerException 
exception, Object ctx)
         return future;
     }
 
+    protected CompletableFuture<Void> internalRemovePropertiesAsync(boolean 
authoritative, String key) {
+        return validateTopicOwnershipAsync(topicName, authoritative)
+                .thenCompose(__ -> 
validateNamespaceOperationAsync(topicName.getNamespaceObject(),
+                        NamespaceOperation.CREATE_TOPIC))

Review Comment:
   `Properties` are set when topic is created and it need 
`NamespaceOperation.CREATE_TOPIC` permission, which correspond to `super user` 
/ `tenant administrator`. 
   So Maybe only roles with above permission are allowed to remove properties, 
Or we can add a new TopicOperation `REMOVE_METADATA` which also correspond to 
`super user` / `tenant administrator`.
   
https://github.com/apache/pulsar/blob/1d1f75e4131332c360d7ef0132ddf257feaed940/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/TopicOperation.java#L52



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