I am using Grails 2.3.3
and spring-security-core:2.0-RC4
plugin.
I am trying to protect a controller action by securing it depending on the result of a method call from a service that takes a parameter. This parameter should be something inside the request parameters.
I'd like to be able to do the following:
@Secured("@mySecurityService.myCustomCheck(params.id)")
def myAction(){
//do some things
}
I managed to be able to do the following:
@Secured("@mySecurityService.myCustomCheck()")
but now I have no idea how to access the request parameters that are sent to the controller.
Is it even architecturally possible to reference params
variables inside the @Secured
notation?
PS: I know you'll ask me to use spring-security-acl
plugin. My problem is that it also adds a bunch of other things that I don't think I require.