Grails过滤多个操作
在一个筛选器中,如何匹配同一控制器的多个操作Grails过滤多个操作,grails,filter,Grails,Filter,在一个筛选器中,如何匹配同一控制器的多个操作 def filters = { organisationDelete(controller: "organisation", action: "confirmDelete, delete") { //... } } 在这个映射中,我将“confirmDelete”作为GET,将“delete”作为POST,在旧的ACEGI插件中,我可以编写用逗号分隔的操作。不过,现在有了SpringSecurityCore,我必须使用管道。因此,
def filters = {
organisationDelete(controller: "organisation", action: "confirmDelete, delete") {
//...
}
}
在这个映射中,我将“confirmDelete”作为GET,将“delete”作为POST,在旧的ACEGI插件中,我可以编写用逗号分隔的操作。不过,现在有了SpringSecurityCore,我必须使用管道。因此,下面解决了这个问题
action: "confirmDelete|delete"