engine.checkPermission( proxy, userGroups, user.getJndiName(), user.getAuthenticationLevel(), dn, null,
engine.checkPermission( proxy, userGroups, userName, principal.getAuthenticationLevel(), dn, null,
    private void checkLookupAccess( LdapPrincipal user, Name dn, Attributes entry )            throws NamingException    {        // no permissions checks on the RootDSE        if ( dn.toString().trim().equals( "" ) )        {            return;        }        DirectoryPartitionNexusProxy proxy = InvocationStack.getInstance().peek().getProxy();        Set userGroups = groupCache.getGroups( user.getName() );        Collection tuples = new HashSet();        addPerscriptiveAciTuples( proxy, tuples, dn, entry );        addEntryAciTuples( tuples, entry );        addSubentryAciTuples( proxy, tuples, dn, entry );        // check that we have read access to the entry        engine.checkPermission( proxy, userGroups, user.getJndiName(), user.getAuthenticationLevel(), dn, null,                null, LOOKUP_PERMS, tuples, entry );        // check that we have read access to every attribute type and value        NamingEnumeration attributeList = entry.getAll();        while ( attributeList.hasMore() )        {            Attribute attr = ( Attribute ) attributeList.next();            for ( int ii = 0; ii < attr.size(); ii++ )            {                engine.checkPermission( proxy, userGroups, user.getJndiName(), user.getAuthenticationLevel(), dn,                        attr.getID(), attr.get( ii ), READ_PERMS, tuples, entry );            }        }    }