From commits-return-17042-apmail-directory-commits-archive=directory.apache.org@directory.apache.org Thu Jan 31 17:06:51 2008 Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 37186 invoked from network); 31 Jan 2008 17:06:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jan 2008 17:06:51 -0000 Received: (qmail 46974 invoked by uid 500); 31 Jan 2008 17:06:42 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 46923 invoked by uid 500); 31 Jan 2008 17:06:42 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 46912 invoked by uid 99); 31 Jan 2008 17:06:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2008 09:06:42 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2008 17:06:23 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0B5E81A9832; Thu, 31 Jan 2008 09:06:30 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r617159 - in /directory/apacheds/branches/bigbang/core/src: main/java/org/apache/directory/server/core/authz/ main/java/org/apache/directory/server/core/schema/ test/java/org/apache/directory/server/core/schema/ Date: Thu, 31 Jan 2008 17:06:25 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080131170630.0B5E81A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Thu Jan 31 09:06:19 2008 New Revision: 617159 URL: http://svn.apache.org/viewvc?rev=617159&view=rev Log: o Removed a useless method (and the associated tests) in SchemaChecker o Reorganized some superfluous calls to lookup() for the delete operation Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=617159&r1=617158&r2=617159&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original) +++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Thu Jan 31 09:06:19 2008 @@ -516,7 +516,6 @@ // Access the principal requesting the operation, and bypass checks if it is the admin Invocation invocation = InvocationStack.getInstance().peek(); PartitionNexusProxy proxy = invocation.getProxy(); - ServerEntry entry = proxy.lookup( new LookupOperationContext( registries, name ) , PartitionNexusProxy.LOOKUP_BYPASS ); LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal(); LdapDN principalDn = principal.getJndiName(); @@ -527,6 +526,8 @@ next.delete( deleteContext ); return; } + + ServerEntry entry = proxy.lookup( new LookupOperationContext( registries, name ) , PartitionNexusProxy.LOOKUP_BYPASS ); protectCriticalEntries( name ); Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java?rev=617159&r1=617158&r2=617159&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java (original) +++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java Thu Jan 31 09:06:19 2008 @@ -293,7 +293,7 @@ * @param entryObjectClasses the entry being modified * @throws NamingException if modify operations leave the entry inconsistent * without a STRUCTURAL objectClass - */ + * public static void preventStructuralClassRemovalOnModifyRemove( ObjectClassRegistry registry, Name name, int mod, Attributes attributes, Attribute entryObjectClasses ) throws NamingException { Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=617159&r1=617158&r2=617159&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original) +++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Thu Jan 31 09:06:19 2008 @@ -1694,10 +1694,10 @@ public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException { LdapDN name = opContext.getDn(); - ServerEntry entry = nexus.lookup( new LookupOperationContext( registries, name ) ); if ( name.startsWith( schemaBaseDN ) ) { + ServerEntry entry = nexus.lookup( new LookupOperationContext( registries, name ) ); schemaManager.delete( name, entry, opContext.hasRequestControl( CascadeControl.CONTROL_OID ) ); } Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?rev=617159&r1=617158&r2=617159&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java (original) +++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java Thu Jan 31 09:06:19 2008 @@ -159,7 +159,7 @@ /** * Test case to check the schema checker operates correctly when modify * operations remove objectClasses. - */ + * public void testPreventStructuralClassRemovalOnModifyRemove() throws Exception { LdapDN name = new LdapDN( "uid=akarasulu,ou=users,dc=example,dc=com" );