engine.checkPermission( proxy, userGroups, userName, principal.getAuthenticationLevel(), name, null, null,
engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, null, null,
    public void delete( NextInterceptor next, LdapDN name ) throws NamingException    {        // Access the principal requesting the operation, and bypass checks if it is the admin        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();        // bypass authz code if we are disabled        if ( !enabled )        {            next.delete( name );            return;        }        // bypass authz code but manage caches if operation is performed by the admin        if ( userName.toString().equalsIgnoreCase( PartitionNexus.ADMIN_PRINCIPAL_NORMALIZED ) )        {            next.delete( name );            tupleCache.subentryDeleted( name, entry );            groupCache.groupDeleted( name, entry );            return;        }        Set userGroups = groupCache.getGroups( userName.toString() );        Collection tuples = new HashSet();        addPerscriptiveAciTuples( proxy, tuples, name, entry );        addEntryAciTuples( tuples, entry );        addSubentryAciTuples( proxy, tuples, name, entry );        engine.checkPermission( proxy, userGroups, userName, principal.getAuthenticationLevel(), name, null, null,            REMOVE_PERMS, tuples, entry );        next.delete( name );        tupleCache.subentryDeleted( name, entry );        groupCache.groupDeleted( name, entry );    }