Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.3.1
-
Component/s: None
-
Labels:None
Description
Currently, filters can not require that other filters in the chain be executed before they are. This prevents filters that rely on other filters to set up their environment from functioning correctly.
Allow any filter to define a dependsOn property with a list of filter classes that should be executed before it.
Example:
class MyFilters {
def dependsOn = [MyOtherFilters.class]
def filters = {
filter1(uri:"/*") {
before =
after = {}
afterView = {}
}
}
}
class MyOtherFilters {
def filters = {
filter1(uri:"/*") {
before = {
if (request.isAwesome)
}
after = {}
afterView = {}
}
}
}
Issue Links
- relates to
-
GRAILS-5180
Add support for filter ordering/priority
-
I've got the code ready already, emailing dev list to sanity check the idea.