if ( user.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) || ! enabled )
if ( ! enabled ) { next.modify( name, modOp, mods ); return; }   if ( user.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
    public void modify( NextInterceptor next, Name name, int modOp, Attributes mods ) throws NamingException    {        // Access the principal requesting the operation, and bypass checks if it is the admin        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 )        {            next.modify( name, modOp, mods );            tupleCache.subentryModified( name, modOp, mods, entry );            groupCache.groupModified( name, modOp, mods, entry );            return;        }        Set userGroups = groupCache.getGroups( user.getName() );        Collection tuples = new HashSet();        addPerscriptiveAciTuples( proxy, tuples, name, entry );        addEntryAciTuples( tuples, entry );        addSubentryAciTuples( proxy, tuples, name, entry );        engine.checkPermission( proxy, userGroups, user.getJndiName(), user.getAuthenticationLevel(), name, null,                null, Collections.singleton( MicroOperation.MODIFY ), tuples, entry );        NamingEnumeration attrList = mods.getAll();        Collection perms = null;        switch( modOp )        {            case( DirContext.ADD_ATTRIBUTE ):                perms = ADD_PERMS;                break;            case( DirContext.REMOVE_ATTRIBUTE ):                perms = REMOVE_PERMS;                break;            case( DirContext.REPLACE_ATTRIBUTE ):                perms = REPLACE_PERMS;                break;        }        while( attrList.hasMore() )        {            Attribute attr = ( Attribute ) attrList.next();            for ( int ii = 0; ii < attr.size(); ii++ )            {                engine.checkPermission( proxy, userGroups, user.getJndiName(), user.getAuthenticationLevel(),                        name, attr.getID(), attr.get( ii ), perms, tuples, entry );            }        }        next.modify( name, modOp, mods );        tupleCache.subentryModified( name, modOp, mods, entry );        groupCache.groupModified( name, modOp, mods, entry );    }