user689842
user689842

Reputation:

Grails filter multiple actions

Within one filter, how can I match more than one action of the same controller?

def filters = {
  organisationDelete(controller: "organisation", action: "confirmDelete, delete") { 
    //...
  }
}

In this mapping I have "confirmDelete" as a GET and "delete" as POST

Upvotes: 7

Views: 2286

Answers (1)

user689842
user689842

Reputation:

in the old ACEGI plugin I could write the actions separated by comma. Though, now with Spring Security Core I have to use a pipe. So, the following solves the problem

action: "confirmDelete|delete" 

Upvotes: 6

Related Questions