Currently DelegatedAdminFilter is in front of filters for the RouterConfig. The DelegatedAdminFilter is invoked\, then is in charge of sending the request to its super (ScriptedFilter) for evaluation, then it also proceeds to evaluate privileges on an Exception through a .thenCatchAsync.
The DelegatedAdminFilter should be converted to a Component that can be a Referenced by the ScriptConfig. It should no longer extend ScriptedFilter, removing its ability to filter requests.
A new ScriptedFilter for the ScriptConfig should be created which uses this DelegatedAdminX Reference in a way that delegates script failure handling to a method on the DelegatedAdminX.
By re-thinking this to remove the tight coupling of privilege evaluation and Script filtering, to only delegate to privilege evaluation on script failure, we will improve: code flow, readability, unit test neatness and accuracy, separation of concerns.