import org.codehaus.groovy.grails.plugins.springsecurity.Secured class AppCoreController extends BaseController { def authenticateService def index = { redirect(action:home,params:params) } // the delete, save and update actions only accept POST requests //def allowedMethods = [delete:'POST', save:'POST', update:'POST'] def home = { } def options = { def principal = authenticateService.principal() println principal.getUsername()//get username println principal.getAuthorities()//get authorities() } @Secured(['ROLE_AppAdmin']) def admin = { } }