]> source.dussan.org Git - archiva.git/commitdiff
use faster method to check existence of a role
authorOlivier Lamy <olamy@apache.org>
Fri, 18 Jan 2013 18:19:12 +0000 (18:19 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 18 Jan 2013 18:19:12 +0000 (18:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1435284 13f79535-47bb-0310-9956-ffa450edef68

redback-rbac/redback-rbac-providers/redback-rbac-ldap/src/main/java/org/apache/archiva/redback/rbac/ldap/LdapRbacManager.java

index 48fddf4d4f797838a49603d97b2bd43004ab6320..b3b6b0003172942b3d4983442156c6f4d9cb1922 100644 (file)
@@ -264,7 +264,6 @@ public class LdapRbacManager
     }
 
 
-
     public List<UserAssignment> getAllUserAssignments()
         throws RbacManagerException
     {
@@ -797,7 +796,7 @@ public class LdapRbacManager
         {
             ldapConnection = ldapConnectionFactory.getConnection();
             context = ldapConnection.getDirContext();
-            return ldapRoleMapper.getAllRoles( context ).contains( name );
+            return ldapRoleMapper.hasRole( context, name );
         }
         catch ( MappingException e )
         {