Skip to content

Add controller action based authorization#2

Open
sphiecoh wants to merge 6 commits intoTypecastException:masterfrom
sphiecoh:master
Open

Add controller action based authorization#2
sphiecoh wants to merge 6 commits intoTypecastException:masterfrom
sphiecoh:master

Conversation

@sphiecoh
Copy link

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.

  • I added db migration as well.

@xivSolutions
Copy link
Contributor

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?

@sphiecoh
Copy link
Author

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
wrote:

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?


Reply to this email directly or view it on GitHub
#2 (comment)
.

@gep13
Copy link

gep13 commented Feb 28, 2015

@sphiecoh do you have a link to your blog site? Would love to take a look at this post when it comes out! Thanks!

@JMooreWeb
Copy link

Great job guys. I'm really looking to getting this implemented!
I would love to see an update of this project for the new ASPNET 5 (Framework 4.6).

@xivSolutions
Copy link
Contributor

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 :-)

@bfreshour
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants