@ Override public Set < String > getGroups ( String user ) throws IOException { if ( cachedGroups . containsKey ( user ) ) { return cachedGroups . get ( user ) ; } Set < String > groups = getUnixGroups ( user ) ; if ( ! groups . isEmpty ( ) ) cachedGroups . put ( user , groups ) ; return groups ; }
Returns list of groups for a user