directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r321432 - in /directory/apacheds/trunk/core/src: main/java/org/apache/ldap/server/authz/OldAuthorizationService.java test/org/apache/ldap/server/authz/AuthorizationServiceAsNonAdminTest.java
Date Sat, 15 Oct 2005 18:43:01 GMT
Author: akarasulu
Date: Sat Oct 15 11:42:57 2005
New Revision: 321432

URL: http://svn.apache.org/viewcvs?rev=321432&view=rev
Log:
fixing broken test ... seems like I broke something in the old authz service

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/OldAuthorizationService.java
    directory/apacheds/trunk/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsNonAdminTest.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/OldAuthorizationService.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/OldAuthorizationService.java?rev=321432&r1=321431&r2=321432&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/OldAuthorizationService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/OldAuthorizationService.java
Sat Oct 15 11:42:57 2005
@@ -210,6 +210,14 @@
 
         if ( !principalDn.equals( ADMIN_DN ) )
         {
+            if ( dn.equals( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+            {
+                String msg = "User " + principalDn;
+                msg += " does not have permission to modify the account of the";
+                msg += " admin user.";
+                throw new LdapNoPermissionException( msg );
+            }
+            
             if ( dn.size() > 2 && dn.startsWith( USER_BASE_DN ) )
             {
                 String msg = "User " + principalDn;

Modified: directory/apacheds/trunk/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsNonAdminTest.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsNonAdminTest.java?rev=321432&r1=321431&r2=321432&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsNonAdminTest.java
(original)
+++ directory/apacheds/trunk/core/src/test/org/apache/ldap/server/authz/AuthorizationServiceAsNonAdminTest.java
Sat Oct 15 11:42:57 2005
@@ -87,7 +87,7 @@
         {
             sysRoot.modifyAttributes( "uid=admin",
                     DirContext.REPLACE_ATTRIBUTE, attributes );
-            fail( "User 'uid=admin' should not be able to modify attributes on admin" );
+            fail( "User 'uid=admin,ou=system' should not be able to modify attributes on
admin" );
         } catch( Exception e ) { }
     }
 



Mime
View raw message