Nov 30th, 2005, 01:02 AM
How to config custom Voter w/AfterInvocation
I have a custom Voter that I would like to use w/AfterInvocation security. Everything I have read (3 books that have Acegi chapts and the Acegi docs) cover AfterInvocation but only w/ACLs. Unfortunately, nothing I have read covers how to configure a custom Voter w/AfterInvocation security. It would seem to me that I shouldn't have to implement all of the same classes that the ACL security does.
I think I need to start with implementing AfterInvocationManager but I don't have a clue as to what to put in the decide method.
I'd appreciate any help with this... links, articles, etc.
Dec 1st, 2005, 06:18 PM
OK... I had it all wrong with how I should approach doing what I need to do.
All I had to do was implement my own AfterInvocationProvider which in my mind is sort of like the Voter... this is where you decide/mutate your returned object. So at that point... I just added my implemented AfterInvocationProvider to an AfterInvocationProviderManager and added that to my MethodSecurityInterceptor and it worked.
For some reason, it took some time before I thought to look at the ACL class implementations from the Acegi source files... duh
Anyway... hope this helps a little because I didn't find any documentation on how to set this up for anything but ACLs.
Feb 9th, 2006, 07:52 PM
Would you mind posting some code from your applicationContext-security.xml file of what this looks like? Or a link to some examples? Your help would be greatly appreciated by a newbie like me. Thanks.
Mar 6th, 2006, 01:13 AM
Did you find the JavaDocs in the interface sufficient to do this, or do we need to expand them?