Thought about posting this in the forum, but thought the dev mailing list would be a better place to bring this up.

I've gotten my prototype to successfully perform ACL authentication at the method invocation level. So right now I'm going a bit further beyond the standard ACL implementation given by Acegi to make it fit our needs.

One issue I've run into now when Im attempting to use my own AclObjectIdentity. Because while I can set AclManager to use a specific class of AclObjectIdentity, the JdbcDaoImpl implemenation of BasicAclDao specifically checks for AclObjectIdentity to be of NamedEntityObjectIdentity. So basically any attempt to check ACLs on a custom AclObjectidentity will not work w/ jdbcDaoImpl.

I see from the code that its necessary to do this because it needs to get values from getId() and getClassname(), which are not part of the interface signature of AclObjectIdentity to create the sql string. However, I would think that any sort of string returned by AclObjectIdentity would work.

So I'm wondering if there's a better way this can be handled, like adding a extended interface of AclObjectIdentity that would be called BasicAclObjectIdentity and it would have an additional method such as getNamedEntityString() or something ilke that. And then people could create their own custom implemenations that would return String.

Then the JdbcDaoImpl coudl check to ensure that the object passed in implements BasicAclObjectIdentity, instaed of a specific class implementation, which is really not what the Spring people advocate (code against interfaces, not classes). Re-coding the NamedEntityObjectIdentity to use the extended interface, and returning the string to be used in the SQL w/ the interface method would ensure that it would continue working, i think.

If I'm missing something - then please do point out what it is. (I realize I can write my own custom DAO implementations to handle this stuff, but would like to extend/use as much acegi-provided code as possible.



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Acegisecurity-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer

Reply via email to