remove commented code
caching will be in LdapRbacManager. git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1428613 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
94ee7125c3
commit
9b89e0ec65
|
@ -89,7 +89,6 @@ public class DefaultLdapRoleMapper
|
||||||
public List<String> getAllGroups()
|
public List<String> getAllGroups()
|
||||||
throws MappingException
|
throws MappingException
|
||||||
{
|
{
|
||||||
// TODO caching
|
|
||||||
LdapConnection ldapConnection = null;
|
LdapConnection ldapConnection = null;
|
||||||
|
|
||||||
NamingEnumeration<SearchResult> namingEnumeration = null;
|
NamingEnumeration<SearchResult> namingEnumeration = null;
|
||||||
|
@ -158,7 +157,6 @@ public class DefaultLdapRoleMapper
|
||||||
public List<String> getGroupsMember( String group )
|
public List<String> getGroupsMember( String group )
|
||||||
throws MappingException
|
throws MappingException
|
||||||
{
|
{
|
||||||
// TODO caching
|
|
||||||
LdapConnection ldapConnection = null;
|
LdapConnection ldapConnection = null;
|
||||||
|
|
||||||
NamingEnumeration<SearchResult> namingEnumeration = null;
|
NamingEnumeration<SearchResult> namingEnumeration = null;
|
||||||
|
@ -228,20 +226,6 @@ public class DefaultLdapRoleMapper
|
||||||
public List<String> getGroups( String username )
|
public List<String> getGroups( String username )
|
||||||
throws MappingException
|
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>();
|
List<String> userGroups = new ArrayList<String>();
|
||||||
|
|
||||||
|
@ -285,8 +269,6 @@ public class DefaultLdapRoleMapper
|
||||||
// uid=blabla we only want bla bla
|
// uid=blabla we only want bla bla
|
||||||
userName = StringUtils.substringAfter( userName, "=" );
|
userName = StringUtils.substringAfter( userName, "=" );
|
||||||
userName = StringUtils.substringBefore( userName, "," );
|
userName = StringUtils.substringBefore( userName, "," );
|
||||||
//log.debug( "found group for username {}: '{}", group, userName );
|
|
||||||
|
|
||||||
allMembers.add( userName );
|
allMembers.add( userName );
|
||||||
}
|
}
|
||||||
close( allMembersEnum );
|
close( allMembersEnum );
|
||||||
|
|
Loading…
Reference in New Issue