sijie commented on a change in pull request #8893:
URL: https://github.com/apache/pulsar/pull/8893#discussion_r548200592
##########
File path:
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationProvider.java
##########
@@ -162,6 +162,24 @@
CompletableFuture<Boolean> allowSinkOpsAsync(NamespaceName namespaceName,
String role,
AuthenticationDataSource
authenticationData);
+ /**
+ * Check the a role has the permission to do the package operations in a
namespace.
+ *
+ * @param namespaceName
+ * the namespace name you want to check
+ * @param role
+ * the role to check
+ * @param authenticationData
+ * authentication data related to the role
+ * @return
+ * a boolean value to determine whether authorized or not
+ */
+ default CompletableFuture<Boolean> canDoPackageOpsAsync(NamespaceName
namespaceName, String role,
Review comment:
https://github.com/apache/pulsar/blob/7c68ade453136895d19fa4723351d26256f3d624/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationProvider.java#L434
Check this one.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]