Răsfoiți Sursa

Support just creating the acl_object_identity, without necessarily an acl_permission as well.

Ben Alex 21 ani în urmă
părinte
comite
177c00556d

+ 6 - 0
core/src/main/java/org/acegisecurity/acl/basic/jdbc/JdbcExtendedDaoImpl.java

@@ -232,6 +232,12 @@ public class JdbcExtendedDaoImpl extends JdbcDaoImpl
         // Create acl_object_identity record if required
         createAclObjectIdentityIfRequired(basicAclEntry);
 
+        // Only continue if a recipient is specifed (null recipient indicates
+        // just wanted to ensure the acl_object_identity was created)
+        if (basicAclEntry.getRecipient() == null) {
+        	return;
+        }
+        
         // Retrieve acl_object_identity record details
         AclDetailsHolder aclDetailsHolder = lookupAclDetailsHolder(basicAclEntry
                 .getAclObjectIdentity());