Set userGroups = groupCache.getGroups( user.getName() );
Set userGroups = groupCache.getGroups( userName.toString() );
    public void move( NextInterceptor next, Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn )            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( oriChildName, DirectoryPartitionNexusProxy.LOOKUP_BYPASS );        LdapPrincipal user = ( ( ServerContext ) invocation.getCaller() ).getPrincipal();        Name newName = ( Name ) newParentName.clone();        newName.add( newRn );        // bypass authz code if we are disabled        if ( ! enabled )        {            next.move( oriChildName, newParentName, newRn, deleteOldRn );            return;        }        // bypass authz code but manage caches if operation is performed by the admin        if ( user.getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )        {            next.move( oriChildName, newParentName, newRn, deleteOldRn );            tupleCache.subentryRenamed( oriChildName, newName );            groupCache.groupRenamed( oriChildName, newName );            return;        }        Set userGroups = groupCache.getGroups( user.getName() );        Collection tuples = new HashSet();        addPerscriptiveAciTuples( proxy, tuples, oriChildName, entry );        addEntryAciTuples( tuples, entry );        addSubentryAciTuples( proxy, tuples, oriChildName, entry );        engine.checkPermission( proxy, userGroups, user.getJndiName(), user.getAuthenticationLevel(),                oriChildName, null, null, MOVERENAME_PERMS, tuples, entry );        Collection destTuples = new HashSet();        addPerscriptiveAciTuples( proxy, destTuples, oriChildName, entry );        addEntryAciTuples( destTuples, entry );        addSubentryAciTuples( proxy, destTuples, oriChildName, entry );        engine.checkPermission( proxy, userGroups, user.getJndiName(), user.getAuthenticationLevel(),                oriChildName, null, null, IMPORT_PERMS, tuples, entry );//        if ( deleteOldRn )//        {//            String oldRn = oriChildName.get( oriChildName.size() - 1 );//            if ( NamespaceTools.hasCompositeComponents( oldRn ) )//            {//                String[] comps = NamespaceTools.getCompositeComponents( oldRn );//                for ( int ii = 0; ii < comps.length; ii++ )//                {//                    String id = NamespaceTools.getRdnAttribute( comps[ii] );//                    String value = NamespaceTools.getRdnValue( comps[ii] );//                    engine.checkPermission( next, userGroups, user.getJndiName(),//                            user.getAuthenticationLevel(), oriChildName, id,//                            value, Collections.singleton( MicroOperation.REMOVE ),//                            tuples, entry );//                }//            }//            else//            {//                String id = NamespaceTools.getRdnAttribute( oldRn );//                String value = NamespaceTools.getRdnValue( oldRn );//                engine.checkPermission( next, userGroups, user.getJndiName(),//                        user.getAuthenticationLevel(), oriChildName, id,//                        value, Collections.singleton( MicroOperation.REMOVE ),//                        tuples, entry );//            }//        }        next.move( oriChildName, newParentName, newRn, deleteOldRn );        tupleCache.subentryRenamed( oriChildName, newName );        groupCache.groupRenamed( oriChildName, newName );    }