frankgh commented on code in PR #201:
URL: https://github.com/apache/cassandra-sidecar/pull/201#discussion_r1982065103


##########
server/src/main/java/org/apache/cassandra/sidecar/acl/authorization/RoleBasedAuthorizationProvider.java:
##########
@@ -64,29 +59,28 @@ public void getAuthorizations(User user, 
Handler<AsyncResult<Void>> handler)
     @Override
     public Future<Void> getAuthorizations(User user)
     {
-        List<String> identities = extractIdentities(user);
+        List<String> roles = extractCassandraRoles(user);
 
-        if (identities.isEmpty())
+        if (roles.isEmpty())
         {
-            return Future.failedFuture("Missing client identities");
+            return Future.failedFuture("No cassandra roles found associated 
with the user");
         }
 
-        Set<Authorization> authorizations = new HashSet<>();
-        for (String identity : identities)
+        for (String role : roles)

Review Comment:
   discussed offline and decided to keep the null check to be on the safe side



-- 
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: pr-unsubscr...@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to