engine.checkPermission( proxy, userGroups, userName, principal.getAuthenticationLevel(), name, null, null,
engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, null, null,
    public boolean hasEntry( NextInterceptor next, LdapDN name ) throws NamingException    {        Invocation invocation = InvocationStack.getInstance().peek();        PartitionNexusProxy proxy = invocation.getProxy();        Attributes entry = proxy.lookup( name, PartitionNexusProxy.LOOKUP_BYPASS );        LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();        LdapDN userName = principal.getJndiName();        if ( userName.toNormName().equalsIgnoreCase( PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) || !enabled            || name.toString().trim().equals( "" ) ) // no checks on the rootdse        {            return next.hasEntry( name );        }        Set userGroups = groupCache.getGroups( userName.toNormName() );        Collection tuples = new HashSet();        addPerscriptiveAciTuples( proxy, tuples, name, entry );        addEntryAciTuples( tuples, entry );        addSubentryAciTuples( proxy, tuples, name, entry );        // check that we have browse access to the entry        engine.checkPermission( proxy, userGroups, userName, principal.getAuthenticationLevel(), name, null, null,            BROWSE_PERMS, tuples, entry );        return next.hasEntry( name );    }