Hello all,
I am building a WebAPi with some custom .NET Authorisation filters that I am decorating on my WebAPI controller.
I need to run multiple custom Authorisation filters that need to be ensured that they are executed in a specific order. I have found a few posts around discussing how to do this:
But doing a quick search in the Umbraco code base on GitHub it seems the core is doing something with the order execution of these filters and reversing the order. I was wondering if anyone from the core team or anyone else understands why this would be done at all and more importantly if I try and implement what is suggested in the two posts I found about the order execution will I explode the Umbraco CMS internals that is going on here and totally break everything?!
.NET Auth Filters Order Execution
Hello all,
I am building a WebAPi with some custom .NET Authorisation filters that I am decorating on my WebAPI controller.
I need to run multiple custom Authorisation filters that need to be ensured that they are executed in a specific order. I have found a few posts around discussing how to do this:
http://www.strathweb.com/2012/06/control-the-execution-order-of-your-filters-in-asp-net-web-api/
http://stackoverflow.com/questions/21628467/order-of-execution-with-multiple-filters-in-web-api
But doing a quick search in the Umbraco code base on GitHub it seems the core is doing something with the order execution of these filters and reversing the order. I was wondering if anyone from the core team or anyone else understands why this would be done at all and more importantly if I try and implement what is suggested in the two posts I found about the order execution will I explode the Umbraco CMS internals that is going on here and totally break everything?!
https://github.com/umbraco/Umbraco-CMS/blob/eae00873073f20c60e355ec6e95ff6259ad2652b/src/Umbraco.Web/WebApi/HttpControllerContextExtensions.cs#L33
https://github.com/umbraco/Umbraco-CMS/blob/eae00873073f20c60e355ec6e95ff6259ad2652b/src/Umbraco.Web/WebApi/Filters/FilterGrouping.cs
Look forward to hearing back on this.
Cheers,
Warren
is working on a reply...