Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do i transform a spring security configuration from application.groovy to application.yml

Hi all i need to transform this configuration from application.groovy to application.yml

grails.plugin.springsecurity.controllerAnnotations.staticRules = 
[   '/':            ['permitAll'],  
'/error':           ['permitAll'],  
'/index':           ['permitAll'],  
'/index.gsp':       ['permitAll'],  
'/shutdown':        ['permitAll'],  
'/assets/**':       ['permitAll'],  
'/**/js/**':        ['permitAll'],  
'/**/css/**':       ['permitAll'],  
'/**/images/**':    ['permitAll'],  
'/**/favicon.ico':  ['permitAll'] ]

For example grails.plugin.springsecurity.apf.postOnly = false is represented as

grails:
    plugin:
        springsecurity:
            apf:
                postOnly: false
like image 975
Ahmad Umar Avatar asked Sep 07 '15 13:09

Ahmad Umar


1 Answers

Try with this:

grails:
    plugin:
        springsecurity:
            controllerAnnotations:
                staticRules:
                    '/':                permitAll
                    '/error':           permitAll
                    '/index':           permitAll
                    '/index.gsp':       permitAll
                    '/shutdown':        permitAll
                    '/assets/**':       permitAll
                    '/**/js/**':        permitAll
                    '/**/css/**':       permitAll
                    '/**/images/**':    permitAll
                    '/**/favicon.ico':  permitAll

It works for me. YAML specification taken from official YAML spec website

like image 175
RickyGo Avatar answered Nov 15 '22 02:11

RickyGo