(Quick Reference)

3 General Notes - Reference Documentation

Authors: Burt Beckwith

Version: 2.0.0

3 General Notes

Securing Access

Be sure to guard access to the /securityInfo url since only authorized users should have access to this information. If you're using annotations, you can register mappings in the staticRules property in Config.groovy:

grails.plugin.springsecurity.controllerAnnotations.staticRules = [
   …
   '/securityinfo':    ['ROLE_ADMIN'],
   '/securityinfo/**': ['ROLE_ADMIN'],
   …
]

If you use database Requestmaps, create new ones:

new Requestmap(url: '/securityinfo', configAttribute: 'ROLE_ADMIN').save()
new Requestmap(url: '/securityinfo.*', configAttribute: 'ROLE_ADMIN').save()
new Requestmap(url: '/securityinfo/**', configAttribute: 'ROLE_ADMIN').save()

And if you use the interceptUrlMap approach, add mappings to that property in Config.groovy:

grails.plugin.springsecurity.interceptUrlMap = [
   …
   '/securityinfo':    ['ROLE_ADMIN'],
   '/securityinfo/**': ['ROLE_ADMIN'],
   …
]