Reputation: 460
how can I upgrade an existing grails application with a request map? I didn't use
grails s2-quickstart package user role requestmap
but only
grails s2-quickstart package user role
AFAIK I have to 1) set a line in Config.groovy:
grails.plugins.springsecurity.securityConfigType = "Requestmap"
and then 2) set all the entries via BootStrap.groovy (according to spring's docs ), I get that, but how does the RequestMap Domain Class have to look like? Anything else to do? Thanks
Upvotes: 0
Views: 495
Reputation: 75671
It's a simple class; this is what would be generated if you specify package your.package.name
and class name Requestmap
:
package your.package.name
class Requestmap {
String url
String configAttribute
static mapping = {
cache true
}
static constraints = {
url blank: false, unique: true
configAttribute blank: false
}
}
Once you create this, add this line in Config.groovy
:
grails.plugin.springsecurity.requestMap.className = 'your.package.name.Requestmap'
Upvotes: 2