I have it:
@Secured(['ROLE_USER', 'ROLE_HELPDESK', 'ROLE_ADMIN']) class MyController { def edit = { } @Secured(['ROLE_ADMIN']) def uploadForUser = { params.userId = params.id forward(controller: 'someController', action: 'someAction', params: params) } }
and an integration test, which, it seems to me, should fail:
public void test_uploadForUser_unauthenticated(){ myController.params.id = "testUser" myController.uploadForUser() }
Nevertheless, the tests pass. Is there any way to check controllers annotated with spring security plugin?
source share