URL access denied in grails spring-security -


iam using spring-security-core 3.1.1 in grails 3.2.7 application. want access projectconfiguration.gsp, added following mapping in urlmapping

"/confproject"(view: '/project/projectconfiguration') 

but showing you not authorized access page

i know happened because of did not specify access rules url. added following line in application.groovy

grails.plugin.springsecurity.controllerannotations.staticrules = [ [pattern: '/confproject',    access: ['role_admin']] ] 

but still iam facing unauthorized access message.

why above access rule note working?

i know if access gsp through controller , give @secured annotation controller work fine.

but way?

note: don't want use intercepturlmap method.

this working me.

urlmappings.groovy

"/newsletter"(view: "/pages/newsletter") 

application.groovy

grails.plugin.springsecurity.controllerannotations.staticrules = [     ...     [pattern: '/pages/**',  access: ['permitall']],     ... ] 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -