directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r494154 - in /directory/sandbox/triplesec-jacc2: admin-api/src/main/java/org/safehaus/triplesec/admin/ admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ldap/ admin-api/src/te...
Date Mon, 08 Jan 2007 19:03:10 GMT
Author: djencks
Date: Mon Jan  8 11:03:09 2007
New Revision: 494154

URL: http://svn.apache.org/viewvc?view=rev&rev=494154
Log:
Track Role denials in admin api

Modified:
    directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/Role.java
    directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/RoleModifier.java
    directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/RoleDao.java
    directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ldap/LdapDao.java
    directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ldap/LdapRoleDao.java
    directory/sandbox/triplesec-jacc2/admin-api/src/test/java/org/safehaus/triplesec/admin/EntryModifierTest.java
    directory/sandbox/triplesec-jacc2/admin-api/src/test/java/org/safehaus/triplesec/admin/IntegrationTest.java
    directory/sandbox/triplesec-jacc2/jacc/src/main/java/org/apache/directory/triplesec/jacc/data/Role.java

Modified: directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/Role.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/Role.java?view=diff&rev=494154&r1=494153&r2=494154
==============================================================================
--- directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/Role.java
(original)
+++ directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/Role.java
Mon Jan  8 11:03:09 2007
@@ -34,18 +34,19 @@
     private final String applicationName;
     private final String name;
     private final Set grants;
+    private final Set denials;
     private final String description;
 
     
-    public Role( String creatorsName, Date createTimestamp, RoleDao dao, String applicationName,

-        String name, String description, Set grants )
+    public Role(String creatorsName, Date createTimestamp, RoleDao dao, String applicationName,
+            String name, String description, Set grants, Set denials)
     {
-        this( creatorsName, createTimestamp, null, null, dao, applicationName, name, description,
grants );
+        this( creatorsName, createTimestamp, null, null, dao, applicationName, name, description,
grants, denials);
     }
     
     
-    public Role( String creatorsName, Date createTimestamp, String modifiersName, Date modifyTimestamp,

-        RoleDao dao, String applicationName, String name, String description, Set grants
)
+    public Role(String creatorsName, Date createTimestamp, String modifiersName, Date modifyTimestamp,
+            RoleDao dao, String applicationName, String name, String description, Set grants,
Set denials)
     {
         super( creatorsName, createTimestamp, modifiersName, modifyTimestamp );
         this.dao = dao;
@@ -53,6 +54,7 @@
         this.name = name;
         this.description = description;
         this.grants = new HashSet( grants );
+        this.denials = new HashSet( denials );
     }
 
 
@@ -61,6 +63,9 @@
         return Collections.unmodifiableSet( grants );
     }
 
+    public Set getDenials() {
+        return Collections.unmodifiableSet( denials );
+    }
 
     public String getName()
     {

Modified: directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/RoleModifier.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/RoleModifier.java?view=diff&rev=494154&r1=494153&r2=494154
==============================================================================
--- directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/RoleModifier.java
(original)
+++ directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/RoleModifier.java
Mon Jan  8 11:03:09 2007
@@ -38,6 +38,7 @@
     private final String applicationName;
     private SingleValuedField description;
     private MultiValuedField grants;
+    private MultiValuedField denials;
     private boolean persisted = false;
     
     
@@ -49,6 +50,7 @@
         this.name = name;
         this.description = new SingleValuedField( DESCRIPTION_ID, null );
         this.grants = new MultiValuedField( GRANTS_ID, Collections.EMPTY_SET );
+        this.denials = new MultiValuedField( DENIALS_ID, Collections.EMPTY_SET );
     }
     
     
@@ -60,6 +62,7 @@
         this.name = archetype.getName();
         this.description = new SingleValuedField( DESCRIPTION_ID, archetype.getDescription()
);
         this.grants = new MultiValuedField( GRANTS_ID, archetype.getGrants() );
+        this.denials = new MultiValuedField( DENIALS_ID, archetype.getDenials() );
     }
     
     
@@ -94,6 +97,30 @@
     }
     
     
+    public RoleModifier addDenial( String denial )
+    {
+        if ( denial == null )
+        {
+            return this;
+        }
+
+        denials.addValue( denial );
+        return this;
+    }
+
+
+    public RoleModifier removeDenial( String denial )
+    {
+        if ( denial == null )
+        {
+            return this;
+        }
+
+        denials.removeValue( denial );
+        return this;
+    }
+
+
     public Role getArchetype()
     {
         return archetype;
@@ -112,6 +139,10 @@
         {
             mods.add( grants.getModificationItem() );
         }
+        if ( denials.isUpdateNeeded() )
+        {
+            mods.add( denials.getModificationItem() );
+        }
         if ( description.isUpdateNeeded() )
         {
             mods.add( description.getModificationItem() );
@@ -151,7 +182,7 @@
         {
             throw new IllegalStateException( INVALID_MSG );
         }
-        Role role = dao.add( applicationName, name, description.getCurrentValue(), grants.getCurrentValues()
);
+        Role role = dao.add( applicationName, name, description.getCurrentValue(), grants.getCurrentValues(),
denials.getCurrentValues());
         persisted = true;
         return role;
     }
@@ -183,7 +214,7 @@
             throw new IllegalStateException( INVALID_MSG );
         }
         Role role = dao.modify( archetype.getCreatorsName(), archetype.getCreateTimestamp(),
applicationName, 
-            name, description.getCurrentValue(), grants.getCurrentValues(), getModificationItems()
);
+            name, description.getCurrentValue(), grants.getCurrentValues(), denials.getCurrentValues(),
getModificationItems() );
         persisted = true;
         return role;
     }

Modified: directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/RoleDao.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/RoleDao.java?view=diff&rev=494154&r1=494153&r2=494154
==============================================================================
--- directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/RoleDao.java
(original)
+++ directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/RoleDao.java
Mon Jan  8 11:03:09 2007
@@ -38,14 +38,14 @@
     Role load( String applicationName, String name ) 
         throws DataAccessException;
 
-    Role add( String applicationName, String name, String currentValue, Set currentValues
) 
+    Role add(String applicationRdn, String roleName, String description, Set grants, Set
denials)
         throws DataAccessException;
 
     Role rename( String newName, Role archetype ) 
         throws DataAccessException;
 
-    Role modify( String creatorsName, Date createTimestamp, String applicationName, String
name, 
-        String description, Set grants, ModificationItem[] mods )  throws DataAccessException;
+    Role modify(String creatorsName, Date createTimestamp, String applicationName, String
name,
+            String description, Set grants, Set denials, ModificationItem[] mods)  throws
DataAccessException;
 
     void delete( String applicationName, String name ) 
         throws DataAccessException;

Modified: directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ldap/LdapDao.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ldap/LdapDao.java?view=diff&rev=494154&r1=494153&r2=494154
==============================================================================
--- directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ldap/LdapDao.java
(original)
+++ directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ldap/LdapDao.java
Mon Jan  8 11:03:09 2007
@@ -20,12 +20,13 @@
 package org.safehaus.triplesec.admin.dao.ldap;
 
 
+import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
 
 public interface LdapDao
 {
-    Object getEntryObject( Object extra, Attributes attrs );
+    Object getEntryObject( Object extra, Attributes attrs ) throws NamingException;
 
     void deleteEntry( String rdn );
 }

Modified: directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ldap/LdapRoleDao.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ldap/LdapRoleDao.java?view=diff&rev=494154&r1=494153&r2=494154
==============================================================================
--- directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ldap/LdapRoleDao.java
(original)
+++ directory/sandbox/triplesec-jacc2/admin-api/src/main/java/org/safehaus/triplesec/admin/dao/ldap/LdapRoleDao.java
Mon Jan  8 11:03:09 2007
@@ -56,7 +56,7 @@
 {
     private static final Logger log = LoggerFactory.getLogger( LdapRoleDao.class );
     private static final String[] ATTRIBUTES = new String[] {
-        ROLE_NAME_ID, DESCRIPTION_ID, GRANTS_ID, CREATORS_NAME_ID, CREATE_TIMESTAMP_ID, 
+        ROLE_NAME_ID, DESCRIPTION_ID, GRANTS_ID, DENIALS_ID, CREATORS_NAME_ID, CREATE_TIMESTAMP_ID,

         MODIFIERS_NAME_ID, MODIFY_TIMESTAMP_ID
     };
     private final DirContext ctx;
@@ -120,25 +120,17 @@
 
     public Role load( String appName, String roleName ) throws DataAccessException
     {
-        String description = null;
-        Set grants = Collections.EMPTY_SET;
         String rdn = getRoleRdn( appName, roleName );
-        Attributes attrs = null;
-        
-        String creatorsName = null;
-        String modifiersName = null;
-        Date createTimestamp = null;
-        Date modifyTimestamp = null;
-        
         try
         {
-            attrs = ctx.getAttributes( rdn, ATTRIBUTES );
-            description = LdapUtils.getSingleValued( DESCRIPTION_ID, attrs );
-            creatorsName = LdapUtils.getPrincipal( CREATORS_NAME_ID, attrs );
-            modifiersName = LdapUtils.getPrincipal( MODIFIERS_NAME_ID, attrs );
-            createTimestamp = LdapUtils.getDate( CREATE_TIMESTAMP_ID, attrs );
-            modifyTimestamp = LdapUtils.getDate( MODIFY_TIMESTAMP_ID, attrs );
+            Attributes attrs = ctx.getAttributes( rdn, ATTRIBUTES );
+            String description = LdapUtils.getSingleValued( DESCRIPTION_ID, attrs );
+            String creatorsName = LdapUtils.getPrincipal( CREATORS_NAME_ID, attrs );
+            String modifiersName = LdapUtils.getPrincipal( MODIFIERS_NAME_ID, attrs );
+            Date createTimestamp = LdapUtils.getDate( CREATE_TIMESTAMP_ID, attrs );
+            Date modifyTimestamp = LdapUtils.getDate( MODIFY_TIMESTAMP_ID, attrs );
             
+            Set grants = Collections.EMPTY_SET;
             if ( attrs.get( GRANTS_ID ) != null )
             {
                 grants = new HashSet();
@@ -147,6 +139,19 @@
                     grants.add( ii.next() );
                 }
             }
+
+            Set denials = Collections.EMPTY_SET;
+            if ( attrs.get( DENIALS_ID ) != null )
+            {
+                denials = new HashSet();
+                for ( NamingEnumeration ii = attrs.get( DENIALS_ID ).getAll(); ii.hasMore();
/**/ )
+                {
+                    denials.add( ii.next() );
+                }
+            }
+
+            return new Role( creatorsName, createTimestamp, modifiersName, modifyTimestamp,
this, appName, roleName,
+                description, Collections.unmodifiableSet( grants ), denials);
         }
         catch ( NameNotFoundException e )
         {
@@ -161,12 +166,10 @@
             throw new DataAccessException( msg );
         }
         
-        return new Role( creatorsName, createTimestamp, modifiersName, modifyTimestamp, this,
appName, roleName, 
-            description, Collections.unmodifiableSet( grants ) );
     }
 
 
-    public Role add( String appRdn, String roleName, String description, Set grants )
+    public Role add(String appRdn, String roleName, String description, Set grants, Set denials)
         throws DataAccessException
     {
         BasicAttributes attrs = new BasicAttributes( OBJECT_CLASS_ID, POLICY_ROLE_OC, true
);
@@ -178,18 +181,27 @@
         if ( ! grants.isEmpty() )
         {
             BasicAttribute attr = new BasicAttribute( GRANTS_ID );
-            for (Object grant : grants) {
-                attr.add(grant);
+            for (Object permId : grants) {
+                attr.add(permId);
             }
             attrs.put( attr );
         }
         
+        if ( ! denials.isEmpty() )
+        {
+            BasicAttribute attr = new BasicAttribute( DENIALS_ID );
+            for (Object permId : denials) {
+                attr.add(permId);
+            }
+            attrs.put( attr );
+        }
+
         String rdn = getRoleRdn( appRdn, roleName );
         try
         {
             ctx.createSubcontext( rdn, attrs );
             return new Role( principalName, new Date( System.currentTimeMillis() ), this,

-                appRdn, roleName, description, grants );
+                appRdn, roleName, description, grants, denials);
         }
         catch ( NameAlreadyBoundException e )
         {
@@ -242,12 +254,12 @@
         
         return new Role( role.getCreatorsName(), role.getCreateTimestamp(), principalName,

             new Date( System.currentTimeMillis() ), this, role.getApplicationName(), newRoleName,

-            role.getDescription(), role.getGrants() );
+            role.getDescription(), role.getGrants(), role.getDenials() );
     }
 
 
-    public Role modify( String creatorsName, Date createTimestamp, String appName, String
roleName, 
-        String description, Set grants, ModificationItem[] mods )
+    public Role modify(String creatorsName, Date createTimestamp, String appName, String
roleName,
+            String description, Set grants, Set denials, ModificationItem[] mods)
         throws DataAccessException
     {
             String rdn = getRoleRdn( appName, roleName );
@@ -277,7 +289,7 @@
             }
             
             return new Role( creatorsName, createTimestamp, principalName, new Date( System.currentTimeMillis()
), 
-                this, appName, roleName, description, grants );
+                this, appName, roleName, description, grants, denials);
     }
 
 
@@ -332,25 +344,14 @@
     // -----------------------------------------------------------------------
 
     
-    public Object getEntryObject( Object extra, Attributes attrs )
-    {
-        String roleName = null;
-        String description = null;
-        Set grants = Collections.EMPTY_SET;
-        
-        String creatorsName = null;
-        String modifiersName = null;
-        Date createTimestamp = null;
-        Date modifyTimestamp = null;
-        
-        try
-        {
-            roleName = ( String ) attrs.get( ROLE_NAME_ID ).get();
-            description = LdapUtils.getSingleValued( DESCRIPTION_ID, attrs );
-            creatorsName = LdapUtils.getPrincipal( CREATORS_NAME_ID, attrs );
-            modifiersName = LdapUtils.getPrincipal( MODIFIERS_NAME_ID, attrs );
-            createTimestamp = LdapUtils.getDate( CREATE_TIMESTAMP_ID, attrs );
-            modifyTimestamp = LdapUtils.getDate( MODIFY_TIMESTAMP_ID, attrs );
+    public Object getEntryObject( Object extra, Attributes attrs ) throws NamingException
{
+            String roleName = ( String ) attrs.get( ROLE_NAME_ID ).get();
+            String description = LdapUtils.getSingleValued( DESCRIPTION_ID, attrs );
+            String creatorsName = LdapUtils.getPrincipal( CREATORS_NAME_ID, attrs );
+            String modifiersName = LdapUtils.getPrincipal( MODIFIERS_NAME_ID, attrs );
+            Date createTimestamp = LdapUtils.getDate( CREATE_TIMESTAMP_ID, attrs );
+            Date modifyTimestamp = LdapUtils.getDate( MODIFY_TIMESTAMP_ID, attrs );
+            Set grants = Collections.EMPTY_SET;
             if ( attrs.get( GRANTS_ID ) != null )
             {
                 grants = new HashSet();
@@ -359,15 +360,18 @@
                     grants.add( ii.next() );
                 }
             }
-        }
-        catch ( NamingException e )
-        {
-            String msg = "Failed to produce object for attributes: " + attrs;
-            log.error( msg, e );
-        }
-        
-        return new Role( creatorsName, createTimestamp, modifiersName, modifyTimestamp, this,

-            ( String ) extra, roleName, description, Collections.unmodifiableSet( grants
) );
+            Set denials = Collections.EMPTY_SET;
+            if ( attrs.get( DENIALS_ID ) != null )
+            {
+                denials = new HashSet();
+                for ( NamingEnumeration ii = attrs.get( DENIALS_ID ).getAll(); ii.hasMore();
/**/ )
+                {
+                    denials.add( ii.next() );
+                }
+            }
+            return new Role( creatorsName, createTimestamp, modifiersName, modifyTimestamp,
this,
+                ( String ) extra, roleName, description, grants, denials);
+
     }
 
 

Modified: directory/sandbox/triplesec-jacc2/admin-api/src/test/java/org/safehaus/triplesec/admin/EntryModifierTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/admin-api/src/test/java/org/safehaus/triplesec/admin/EntryModifierTest.java?view=diff&rev=494154&r1=494153&r2=494154
==============================================================================
--- directory/sandbox/triplesec-jacc2/admin-api/src/test/java/org/safehaus/triplesec/admin/EntryModifierTest.java
(original)
+++ directory/sandbox/triplesec-jacc2/admin-api/src/test/java/org/safehaus/triplesec/admin/EntryModifierTest.java
Mon Jan  8 11:03:09 2007
@@ -79,7 +79,8 @@
         grants.add( "bend" );
         grants.add( "fold" );
         grants.add( "spindle" );
-        Role archetype = new Role( null, null, null, "testApp", "testRole", null, grants
);
+        Set denials = new HashSet();
+        Role archetype = new Role( null, null, null, "testApp", "testRole", null, grants,
denials);
         
         RoleModifier modifier = new RoleModifier( null, archetype );
         assertFalse( modifier.isUpdateNeeded() );
@@ -105,7 +106,8 @@
         grants.add( "bend" );
         grants.add( "fold" );
         grants.add( "spindle" );
-        Role archetype = new Role( null, null, null, "testApp", "testRole", null, grants
);
+        Set denials = new HashSet();
+        Role archetype = new Role( null, null, null, "testApp", "testRole", null, grants,
denials);
         
         RoleModifier modifier = new RoleModifier( null, archetype );
         assertFalse( modifier.isUpdateNeeded() );

Modified: directory/sandbox/triplesec-jacc2/admin-api/src/test/java/org/safehaus/triplesec/admin/IntegrationTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/admin-api/src/test/java/org/safehaus/triplesec/admin/IntegrationTest.java?view=diff&rev=494154&r1=494153&r2=494154
==============================================================================
--- directory/sandbox/triplesec-jacc2/admin-api/src/test/java/org/safehaus/triplesec/admin/IntegrationTest.java
(original)
+++ directory/sandbox/triplesec-jacc2/admin-api/src/test/java/org/safehaus/triplesec/admin/IntegrationTest.java
Mon Jan  8 11:03:09 2007
@@ -277,7 +277,7 @@
         
         // create a new role after changing modifier's description and grants
         Role role = app.modifier().newRole( "testRole" ).setDescription( "test role" )
-            .addGrant( "mockPerm0" ).addGrant( "mockPerm1" ).add();
+            .addGrant( "mockPerm0" ).addGrant( "mockPerm1" ).addDenial("mockPerm8").add();
         assertNotNull( role );
         assertEquals( APP_RDN, role.getApplicationName() );
         assertEquals( "testRole", role.getName() );
@@ -286,7 +286,8 @@
         assertTrue( role.getGrants().contains( "mockPerm0" ) );
         assertTrue( role.getGrants().contains( "mockPerm1" ) );
         assertFalse( role.getGrants().contains( "bogus" ) );
-        
+        assertTrue( role.getDenials().contains( "mockPerm8" ) );
+
         // lookup and confirm values again
         role = app.getRole( "testRole" );
         assertNotNull( role );
@@ -297,10 +298,11 @@
         assertTrue( role.getGrants().contains( "mockPerm0" ) );
         assertTrue( role.getGrants().contains( "mockPerm1" ) );
         assertFalse( role.getGrants().contains( "bogus" ) );
-        
+        assertTrue( role.getDenials().contains( "mockPerm8" ) );
+
         // remove existing grant, add two new ones, and modify
         role = role.modifier().removeGrant( "mockPerm1" ).addGrant( "mockPerm2" )
-            .addGrant( "mockPerm3" ).setDescription( "changed description" ).modify();
+            .addGrant( "mockPerm3" ).removeDenial( "mockPerm8" ).addDenial( "mockPerm9").setDescription(
"changed description" ).modify();
         assertNotNull( role );
         assertEquals( "changed description", role.getDescription() );
         assertEquals( 3, role.getGrants().size() );
@@ -308,7 +310,9 @@
         assertTrue( role.getGrants().contains( "mockPerm2" ) );
         assertTrue( role.getGrants().contains( "mockPerm3" ) );
         assertFalse( role.getGrants().contains( "bogus" ) );
-        
+        assertFalse( role.getDenials().contains( "mockPerm8" ) );
+        assertTrue( role.getDenials().contains( "mockPerm9" ) );
+
         // rename the role, test values, look it up again and test values again
         role = role.modifier().rename( "renamedRole" );
         assertNotNull( role );
@@ -320,6 +324,8 @@
         assertTrue( role.getGrants().contains( "mockPerm2" ) );
         assertTrue( role.getGrants().contains( "mockPerm3" ) );
         assertFalse( role.getGrants().contains( "bogus" ) );
+        assertFalse( role.getDenials().contains( "mockPerm8" ) );
+        assertTrue( role.getDenials().contains( "mockPerm9" ) );
 
         role = app.getRole( "renamedRole" );
         assertNotNull( role );
@@ -331,7 +337,9 @@
         assertTrue( role.getGrants().contains( "mockPerm2" ) );
         assertTrue( role.getGrants().contains( "mockPerm3" ) );
         assertFalse( role.getGrants().contains( "bogus" ) );
-        
+        assertFalse( role.getDenials().contains( "mockPerm8" ) );
+        assertTrue( role.getDenials().contains( "mockPerm9" ) );
+
         // delete the role
         role.modifier().delete();
         try

Modified: directory/sandbox/triplesec-jacc2/jacc/src/main/java/org/apache/directory/triplesec/jacc/data/Role.java
URL: http://svn.apache.org/viewvc/directory/sandbox/triplesec-jacc2/jacc/src/main/java/org/apache/directory/triplesec/jacc/data/Role.java?view=diff&rev=494154&r1=494153&r2=494154
==============================================================================
--- directory/sandbox/triplesec-jacc2/jacc/src/main/java/org/apache/directory/triplesec/jacc/data/Role.java
(original)
+++ directory/sandbox/triplesec-jacc2/jacc/src/main/java/org/apache/directory/triplesec/jacc/data/Role.java
Mon Jan  8 11:03:09 2007
@@ -70,7 +70,7 @@
         try {
             roleDao.load(contextID, roleName);
         } catch (DataAccessException e) {
-            roleDao.add(contextID, roleName, null, null);
+            roleDao.add(contextID, roleName, null, null, denials);
         }
         String contextDn = getRelativeDn(contextID, roleName);
         for (PermissionClass permissionClass : getPermissionClasses()) {



Mime
View raw message