From commits-return-20636-archive-asf-public=cust-asf.ponee.io@pulsar.apache.org Fri Jan 18 02:33:25 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 96726180663 for ; Fri, 18 Jan 2019 02:33:24 +0100 (CET) Received: (qmail 33627 invoked by uid 500); 18 Jan 2019 01:33:23 -0000 Mailing-List: contact commits-help@pulsar.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pulsar.apache.org Delivered-To: mailing list commits@pulsar.apache.org Received: (qmail 33612 invoked by uid 99); 18 Jan 2019 01:33:23 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jan 2019 01:33:23 +0000 From: GitBox To: commits@pulsar.apache.org Subject: [GitHub] ivankelly commented on a change in pull request #3383: refactor AuthorizationProvider interface to allow custom logic for determining super user Message-ID: <154777520296.5924.12265342297612213515.gitbox@gitbox.apache.org> Date: Fri, 18 Jan 2019 01:33:22 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit ivankelly commented on a change in pull request #3383: refactor AuthorizationProvider interface to allow custom logic for determining super user URL: https://github.com/apache/pulsar/pull/3383#discussion_r248901944 ########## File path: pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationService.java ########## @@ -187,7 +201,15 @@ public AuthorizationService(ServiceConfiguration conf, ConfigurationCacheService return CompletableFuture.completedFuture(true); } if (provider != null) { - return provider.canConsumeAsync(topicName, role, authenticationData, subscription); + return provider.isSuperUser(role).thenComposeAsync(isSuperUser -> { + if (isSuperUser) { + CompletableFuture future = new CompletableFuture<>(); Review comment: Same thing with completedFuture. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services