As mentioned above, the plugin has changed to a pessimistic lock, so any thing without a certain level of security will throw out "Sorry, you are not authorized to view this page." message.
Other answers already said that you can just use the s2ui-override script to generate all the controllers and add @Secure annotation
grails s2ui-override user com.myApp grails s2ui-override role com.myApp
then edit to add
import grails.plugin.springsecurity.annotation.Secured @Secured(['ROLE_ADMIN']) class UserController ...
But instead of creating empty empty controllers, you can simply modify the static rule file in Config.groovy.
grails.plugin.springsecurity.controllerAnnotations.staticRules = [ '/': ['permitAll'], '/**/css/**': ['permitAll'], '/**/images/**': ['permitAll'], <snip> '/register/**': ['permitAll'], '/user/**': ['ROLE_ADMIN'], '/role/**': ['ROLE_ADMIN'],
Adding these three lines will allow the register controller to be accessible to all, and user and role controllers are available only to ROLE_ADMIN users.
burns
source share