Grails security filter doesn't work with 2 controllers -


i'm using grails 2.4.3, created security filter. had 3 controller in project name: admin, login , report. added following filter:

def filters = {         all(controller: 'admin', action: '*') {             before = {                 if (!session.company) {                     redirect(controller: 'login', action: 'auth')                     return false                 }             }             after = { map model ->              }             afterview = { exception e ->              }         }     } 

i mean actions admin controller, if !session.company, page redirected auth action in login controller.

now i'd add controller report filter, how do that? tried all(controller: ['admin', 'report'], action: '*') doesn't work.

any appreciated. thanks

use pipe symbol add multiple controllers, like

def filters = {     all(controller: 'admin|report', action: '*') {         ...     } } 

ref# how define mutliple distinct controllers in grails 2 filter?


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -