I were using spring security plugin for authorization. Now I wanted to use jasper plugin for generating reports. But, instead of generating the reports it shows Sorry, you're not authorized to view this page. error.
Config.groovy:
grails.plugin.springsecurity.controllerAnnotations.staticRules = [
'/' : ['permitAll'],
'/index' : ['permitAll'],
'/index.gsp' : ['permitAll'],
'/assets/**' : ['permitAll'],
'/**/js/**' : ['permitAll'],
'/**/css/**' : ['permitAll'],
'/**/images/**' : ['permitAll'],
'/**/fonts/**' : ['permitAll'],
'/**/favicon.ico' : ['permitAll'],
'/**/font-awesome/**': ['permitAll'],
'/**/reports/' : ['permitAll']
]
environments {
development {
jasper.dir.reports = '../src/reports'
}
production {
jasper.dir.reports = '/home/Sample-Reports'
// TODO: grails.serverURL = "http://www.changeme.com"
}
}
How can I solve this problem?
EDIT: grails version 2.4.4 spring security version 2.0
in Config.groovy try to add the following:
grails.plugins.springsecurity.interceptUrlMap = [
'/pathToActionThatGeneratesDocument/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
]