use new method

git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1433394 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-01-15 13:19:40 +00:00
parent 850575cd71
commit 43be70ac4e
1 changed files with 1 additions and 20 deletions

View File

@ -82,9 +82,7 @@ public class LdapAuthorizer
String resource = source.getResource();
try
{
List<String> ldapGroups = ldapRoleMapper.getGroups( userName );
List<String> roles = mapLdapGroups( ldapGroups );
List<String> roles = ldapRoleMapper.getRoles( userName );
Map<String, List<Permission>> permissionMap = getAssignedPermissionMap( roles );
@ -122,24 +120,7 @@ public class LdapAuthorizer
}
protected List<String> mapLdapGroups( List<String> groups )
throws MappingException
{
List<String> roles = new ArrayList<String>();
Map<String, String> mapping = ldapRoleMapper.getLdapGroupMappings();
for ( String group : groups )
{
String role = mapping.get( group );
if ( role != null )
{
roles.add( role );
}
}
return roles;
}
public Map<String, List<Permission>> getAssignedPermissionMap( List<String> roles )
throws RbacObjectNotFoundException, RbacManagerException