From 43be70ac4e0b67ad0b61330deb3f488deee481f3 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 15 Jan 2013 13:19:40 +0000 Subject: [PATCH] use new method git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1433394 13f79535-47bb-0310-9956-ffa450edef68 --- .../authorization/ldap/LdapAuthorizer.java | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/redback-authorization/redback-authorization-providers/redback-authorization-ldap/src/main/java/org/apache/archiva/redback/authorization/ldap/LdapAuthorizer.java b/redback-authorization/redback-authorization-providers/redback-authorization-ldap/src/main/java/org/apache/archiva/redback/authorization/ldap/LdapAuthorizer.java index 22ecb576..486744dd 100644 --- a/redback-authorization/redback-authorization-providers/redback-authorization-ldap/src/main/java/org/apache/archiva/redback/authorization/ldap/LdapAuthorizer.java +++ b/redback-authorization/redback-authorization-providers/redback-authorization-ldap/src/main/java/org/apache/archiva/redback/authorization/ldap/LdapAuthorizer.java @@ -82,9 +82,7 @@ public class LdapAuthorizer String resource = source.getResource(); try { - List ldapGroups = ldapRoleMapper.getGroups( userName ); - - List roles = mapLdapGroups( ldapGroups ); + List roles = ldapRoleMapper.getRoles( userName ); Map> permissionMap = getAssignedPermissionMap( roles ); @@ -122,24 +120,7 @@ public class LdapAuthorizer } - protected List mapLdapGroups( List groups ) - throws MappingException - { - List roles = new ArrayList(); - Map mapping = ldapRoleMapper.getLdapGroupMappings(); - - for ( String group : groups ) - { - String role = mapping.get( group ); - if ( role != null ) - { - roles.add( role ); - } - } - - return roles; - } public Map> getAssignedPermissionMap( List roles ) throws RbacObjectNotFoundException, RbacManagerException