As per the documentation, you can reference method arguments in your expression as this:
For this to work, I'm pretty sure you would need to have debugging symbols into your compiled code in order for Spring to find the named variables.Code:@PreAuthorize("#contact.name == authentication.name") public void doSomething(Contact contact, ...) { }
The question is: Is there a way to reference the method's arguments by position instead of by name?
something likeCode:@PreAuthorize("hasPermission(#args[0].name, 'admin')")


Reply With Quote
