Set userGroups = groupCache.getGroups( user.getName() );
Set userGroups = groupCache.getGroups( userName.toString() );
    public boolean hasEntry( NextInterceptor next, Name name ) throws NamingException    {        Invocation invocation = InvocationStack.getInstance().peek();        DirectoryPartitionNexusProxy proxy = invocation.getProxy();        Attributes entry = proxy.lookup( name, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );        LdapPrincipal user = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();        if ( user.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || ! enabled                || name.toString().trim().equals( "" ) ) // no checks on the rootdse        {            return next.hasEntry( name );        }        Set userGroups = groupCache.getGroups( user.getName() );        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, user.getJndiName(), user.getAuthenticationLevel(), name, null,                null, BROWSE_PERMS, tuples, entry );        return next.hasEntry( name );    }