Quantcast

Anyone Used grails.plugins.springsecurity.voterNames?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Anyone Used grails.plugins.springsecurity.voterNames?

Jonathan Rosenberg-2
According to the Spring Security Core plugin I can set

        grails.plugins.springsecurity.voterNames

in configuration to a list of beans that implement the
AccessDecisionVoter interface.

I was having trouble getting this to use a new voter, so I tried
setting the list to be empty:

          grails.plugins.springsecurity.voterNames = []

I did a grails clean and then run-app.   The app ran fine, just as if
the default voters were in place.

Has anyone used this property successfully?

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Anyone Used grails.plugins.springsecurity.voterNames?

deerow
This post has NOT been accepted by the mailing list yet.
Jonathan,
I created an app following the tutorial in this document I created a voter that implements the AccessDecisionVoter interface.  I then defined it in the conf/spring/resources.groovy like this:
import com.testacl.CompanyVoter
beans = {
	myAccessDecisionVoter(com.testacl.CompanyVoter)
}

In my config.groovy, I added this line
grails.plugins.springsecurity.voterNames = ['myAccessDecisionVoter']

My voter has no logic in it.  It returns true or 1 for each function.  I have verified that it is getting called by setting breakpoints in STS.  

It appears that the voterNames are in addition to the default names.  The tutorial behaves almost Identically with my "do nothing" voter.  The only change is that the login page is not displayed when not logged in.  I'm still on a learning curve.  Hope this helps you out.

Mark
Jonathan Rosenberg-2 wrote
According to the Spring Security Core plugin I can set

        grails.plugins.springsecurity.voterNames

in configuration to a list of beans that implement the
AccessDecisionVoter interface.

I was having trouble getting this to use a new voter, so I tried
setting the list to be empty:

          grails.plugins.springsecurity.voterNames = []

I did a grails clean and then run-app.   The app ran fine, just as if
the default voters were in place.

Has anyone used this property successfully?
Loading...