Announcement Announcement Module
No announcement yet.
How to config custom Voter w/AfterInvocation Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to config custom Voter w/AfterInvocation

    Hi all,

    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.


  • #2
    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.



    • #3
      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.


      • #4
        Did you find the JavaDocs in the interface sufficient to do this, or do we need to expand them?