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 2020/12/22 18:12:47 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #8893: Add auth action for package management service

sijie commented on a change in pull request #8893:
URL: https://github.com/apache/pulsar/pull/8893#discussion_r547425554



##########
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:
       We need to add a method like https://github.com/apache/pulsar/pull/8893/files#diff-cea47b9766438a068de61669ccde5f4e8435941c8953edf176aa62ffddf80545R248. This is the new method of defining the permissions. Don't use the old pattern.




----------------------------------------------------------------
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:
users@infra.apache.org