Add controller action based authorization#2
Add controller action based authorization#2sphiecoh wants to merge 6 commits intoTypecastException:masterfrom
Conversation
|
Oohh...looks interesting. I'm going to take a good hard look, and then I may merge into a separate branch. This is too cool, but I do want to keep the existing branch in sync with the original blog post. May need to create a "full" version as a project template/Nuget package. Gonna blog this? |
|
Blog coming soon. Looking at making a Nuget package as well. On Sat, Feb 28, 2015 at 6:08 PM, John Atten notifications@github.com
|
|
@sphiecoh do you have a link to your blog site? Would love to take a look at this post when it comes out! Thanks! |
|
Great job guys. I'm really looking to getting this implemented! |
|
Hey all - Thanks for all this - @sphiecoh - sorry I have been so absent here. I've had a crazy year, and somehow I missed reviewing your PR. Meanwhile, if you do/did a post, make sure to let me know so I can link to it here, and also on my own blog (which has been under revision for a bit). @JMooreWeb - After changing careers (I am now a "professional" developer, as I accepted a position with a startup in Denver, CO) and moving, I am hoping to wrap my head around all the ASP.NET 5 stuff from where I left off...keep your eye out here, and do feel free to spin off a fork :-) |
|
I like this branch, but there's a pretty big issue with the ActionFilterAttribute piece that is a cornerstone of it. After the filter runs once, any additional times it needs to run you will get a message that the DbContext has been disposed. Would probably still work in MVC2, but this change from MVC3 causes the issue: Breaking Changes: In previous versions of ASP.NET MVC, action filters are create per request except in a few cases. This behavior was never a guaranteed behavior but merely an implementation detail and the contract for filters was to consider them stateless. In ASP.NET MVC 3, filters are cached more aggressively. Therefore, any custom action filters which improperly store instance state might be broken. |
I extended on the great work that was already done and added controller/action based authorization which I have found helps a lot with documenting the security model of your application.