Github user Parth-Brahmbhatt commented on a diff in the pull request:

    https://github.com/apache/storm/pull/273#discussion_r18183885
  
    --- Diff: 
storm-core/src/jvm/backtype/storm/security/auth/authorizer/SimpleACLAuthorizer.java
 ---
    @@ -107,12 +108,18 @@ public boolean permit(ReqContext context, String 
operation, Map topology_conf) {
                 if (topoUsers.contains(principal) || topoUsers.contains(user)) 
{
                     return true;
                 }
    -            if(_groups != null) {
    +
    +            Set<String> topoGroups = new HashSet<String>();
    +            if (topology_conf.containsKey(Config.TOPOLOGY_GROUPS)) {
    +                
topoGroups.addAll((Collection<String>)topology_conf.get(Config.TOPOLOGY_GROUPS));
    +            }
    +
    +            if(_groupMappingProvider != null && topoGroups.size() > 0) {
    +                System.out.println("hello in if");
                     try {
    -                    String topologySubmitterUser = (String) 
topology_conf.get(Config.TOPOLOGY_SUBMITTER_USER);
    -                    Set<String> userGroups = _groups.getGroups(user);
    -                    Set<String> topoUserGroups = 
_groups.getGroups(topologySubmitterUser);
    -                    for (String tgroup : topoUserGroups) {
    +                    Set<String> userGroups = 
_groupMappingProvider.getGroups(user);
    +                    for (String tgroup : topoGroups) {
    +                        System.out.println("tgroup "+tgroup);
    --- End diff --
    
    remove.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to