sarankk commented on code in PR #201: URL: https://github.com/apache/cassandra-sidecar/pull/201#discussion_r1982063334
########## 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: We shouldn't get a null entry in List from roles extracted from user attributes, we discussed to keep this check for safer 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