File tree Expand file tree Collapse file tree
auth/src/main/java/org/apache/rocketmq/auth/authentication/manager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,7 +146,12 @@ public CompletableFuture<Void> deleteUser(String username) {
146146 throw new AuthenticationException ("username can not be blank" );
147147 }
148148 CompletableFuture <Void > deleteUser = this .getAuthenticationMetadataProvider ().deleteUser (username );
149- CompletableFuture <Void > deleteAcl = this .getAuthorizationMetadataProvider ().deleteAcl (User .of (username ));
149+ CompletableFuture <Void > deleteAcl = null ;
150+ if (authorizationMetadataProvider == null ) {
151+ deleteAcl = CompletableFuture .completedFuture (null );
152+ } else {
153+ deleteAcl = this .getAuthorizationMetadataProvider ().deleteAcl (User .of (username ));
154+ }
150155 return CompletableFuture .allOf (deleteUser , deleteAcl );
151156 } catch (Exception e ) {
152157 this .handleException (e , result );
You can’t perform that action at this time.
0 commit comments