mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-26 22:02:41 +00:00
Fix bugs.
This commit is contained in:
parent
49f29a8a2b
commit
4c1c7dcff5
@ -224,8 +224,7 @@ public class JdbcExtendedDaoImpl extends JdbcDaoImpl
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Change permission
|
// Change permission
|
||||||
aclPermissionUpdate.update(new Integer(
|
aclPermissionUpdate.update(new Integer(permissionId), newMask);
|
||||||
aclDetailsHolder.getForeignKeyId()), newMask);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void create(BasicAclEntry basicAclEntry) throws DataAccessException {
|
public void create(BasicAclEntry basicAclEntry) throws DataAccessException {
|
||||||
@ -235,7 +234,7 @@ public class JdbcExtendedDaoImpl extends JdbcDaoImpl
|
|||||||
// Only continue if a recipient is specifed (null recipient indicates
|
// Only continue if a recipient is specifed (null recipient indicates
|
||||||
// just wanted to ensure the acl_object_identity was created)
|
// just wanted to ensure the acl_object_identity was created)
|
||||||
if (basicAclEntry.getRecipient() == null) {
|
if (basicAclEntry.getRecipient() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve acl_object_identity record details
|
// Retrieve acl_object_identity record details
|
||||||
@ -286,6 +285,16 @@ public class JdbcExtendedDaoImpl extends JdbcDaoImpl
|
|||||||
aclDetailsHolder.getForeignKeyId()), recipient.toString());
|
aclDetailsHolder.getForeignKeyId()), recipient.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initDao() throws ApplicationContextException {
|
||||||
|
super.initDao();
|
||||||
|
lookupPermissionIdMapping = new LookupPermissionIdMapping(getDataSource());
|
||||||
|
aclPermissionInsert = new AclPermissionInsert(getDataSource());
|
||||||
|
aclObjectIdentityInsert = new AclObjectIdentityInsert(getDataSource());
|
||||||
|
aclPermissionDelete = new AclPermissionDelete(getDataSource());
|
||||||
|
aclObjectIdentityDelete = new AclObjectIdentityDelete(getDataSource());
|
||||||
|
aclPermissionUpdate = new AclPermissionUpdate(getDataSource());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Responsible for covering a <code>AclObjectIdentity</code> to a
|
* Responsible for covering a <code>AclObjectIdentity</code> to a
|
||||||
* <code>String</code> that can be located in the RDBMS.
|
* <code>String</code> that can be located in the RDBMS.
|
||||||
@ -296,8 +305,7 @@ public class JdbcExtendedDaoImpl extends JdbcDaoImpl
|
|||||||
*
|
*
|
||||||
* @throws IllegalArgumentException DOCUMENT ME!
|
* @throws IllegalArgumentException DOCUMENT ME!
|
||||||
*/
|
*/
|
||||||
protected String convertAclObjectIdentityToString(
|
String convertAclObjectIdentityToString(AclObjectIdentity aclObjectIdentity) {
|
||||||
AclObjectIdentity aclObjectIdentity) {
|
|
||||||
// Ensure we can process this type of AclObjectIdentity
|
// Ensure we can process this type of AclObjectIdentity
|
||||||
if (!(aclObjectIdentity instanceof NamedEntityObjectIdentity)) {
|
if (!(aclObjectIdentity instanceof NamedEntityObjectIdentity)) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
@ -311,16 +319,6 @@ public class JdbcExtendedDaoImpl extends JdbcDaoImpl
|
|||||||
return neoi.getClassname() + ":" + neoi.getId();
|
return neoi.getClassname() + ":" + neoi.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void initDao() throws ApplicationContextException {
|
|
||||||
super.initDao();
|
|
||||||
lookupPermissionIdMapping = new LookupPermissionIdMapping(getDataSource());
|
|
||||||
aclPermissionInsert = new AclPermissionInsert(getDataSource());
|
|
||||||
aclObjectIdentityInsert = new AclObjectIdentityInsert(getDataSource());
|
|
||||||
aclPermissionDelete = new AclPermissionDelete(getDataSource());
|
|
||||||
aclObjectIdentityDelete = new AclObjectIdentityDelete(getDataSource());
|
|
||||||
aclPermissionUpdate = new AclPermissionUpdate(getDataSource());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience method that creates an acl_object_identity record if
|
* Convenience method that creates an acl_object_identity record if
|
||||||
* required.
|
* required.
|
||||||
@ -478,7 +476,7 @@ public class JdbcExtendedDaoImpl extends JdbcDaoImpl
|
|||||||
|
|
||||||
protected void update(Integer aclPermissionId, Integer newMask)
|
protected void update(Integer aclPermissionId, Integer newMask)
|
||||||
throws DataAccessException {
|
throws DataAccessException {
|
||||||
super.update(aclPermissionId.intValue(), newMask.intValue());
|
super.update(newMask.intValue(), aclPermissionId.intValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user