You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/07 05:36:58 UTC

[GitHub] [pulsar] mattisonchao commented on a diff in pull request #15956: [modify][admin] Change the permissions of the schema API from Admin to normal produce/consume

mattisonchao commented on code in PR #15956:
URL: https://github.com/apache/pulsar/pull/15956#discussion_r890783653


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/SchemasResourceBase.java:
##########
@@ -97,7 +98,7 @@ public void getSchema(boolean authoritative, AsyncResponse response) {
     }
 
     public CompletableFuture<SchemaAndMetadata> getSchemaAsync(boolean authoritative) {
-        return validateDestinationAndAdminOperationAsync(authoritative)
+        return validateOwnershipAndOperationAsync(authoritative, TopicOperation.CONSUME)

Review Comment:
   Could we introduce a new operation `GET_SCHEMA`? use `canProduce` and `canConsume` to verify it?
   
   The combination mode may bring more flexibility.



-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org