public List<String> getAllGroups()
throws MappingException
{
- // TODO caching
LdapConnection ldapConnection = null;
NamingEnumeration<SearchResult> namingEnumeration = null;
public List<String> getGroupsMember( String group )
throws MappingException
{
- // TODO caching
LdapConnection ldapConnection = null;
NamingEnumeration<SearchResult> namingEnumeration = null;
public List<String> getGroups( String username )
throws MappingException
{
- // TODO caching and a filter with uid
-
- /*List<String> allGroups = getAllGroups();
- List<String> userGroups = new ArrayList<String>();
- for ( String group : allGroups )
- {
- List<String> users = getGroupsMember( group );
- if ( users.contains( username ) )
- {
- userGroups.add( group );
- }
- }
- return userGroups;
- */
List<String> userGroups = new ArrayList<String>();
// uid=blabla we only want bla bla
userName = StringUtils.substringAfter( userName, "=" );
userName = StringUtils.substringBefore( userName, "," );
- //log.debug( "found group for username {}: '{}", group, userName );
-
allMembers.add( userName );
}
close( allMembersEnum );