janhoy commented on a change in pull request #399:
URL: https://github.com/apache/solr/pull/399#discussion_r785361676



##########
File path: 
solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPluginBase.java
##########
@@ -110,6 +113,19 @@ public AuthorizationResponse 
authorize(AuthorizationContext context) {
     return flag.rsp;
   }
 
+  /**
+   * Retrieves permission names for a given set of roles
+   */
+  public Set<String> getPermissionNamesForRoles(Set<String> roles) {
+    Set<String> permissions = new HashSet<>();
+    for (String r : roles) {
+      if (roleToPermissionsMap.containsKey(r)) {

Review comment:
       Done. Also added a unit test for this new method.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to