Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/998#discussion_r145569370
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DrillRoot.java 
---
    @@ -85,21 +86,33 @@ public ClusterInfo getClusterInfoJSON() {
         // For all other cases the user info need-not or should-not be 
displayed
         OptionManager optionManager = work.getContext().getOptionManager();
         final boolean isUserLoggedIn = AuthDynamicFeature.isUserLoggedIn(sc);
    +    final String processUser = isUserLoggedIn ?
    +            ImpersonationUtil.getProcessUserName() : null;
    +    final String processUserGroups = isUserLoggedIn ?
    +            
Joiner.on(",").join(ImpersonationUtil.getProcessUserGroupNames()) : null;
    --- End diff --
    
    Are we guaranteed that the list contains no spaces around the commas? (When 
reading from ZK, the string is user entered, and the string might be "fred   ,  
 bob". Do we have to worry about that here?) If the string might contain extra 
spaces, we might want to use code that Karthik provided to split, strip spaces, 
and combine the names.


---

Reply via email to