I’m looking at the [Authorize(Roles = "DefaultUser")] available in MVC, but I can’t seem to figure out if I can use it with DotNetOpenAuth.
I’m using OpenID as my sole membership provider, but I have a few generic items in a UserProfile table. I don’t want anyone except the appropriate user to be able to access the edit controller.
EXAMPLE:
UserID 2 should not be able to access /Users/Edit/1, but they CAN access /Users/Edit/2
Edit/Rewrite for clearer understanding
And then, using it:
Of course, for it to work,
userIDanduserEmailin the action examples need to be bound by the modelbinder (the parameters have to exist in theRouteData.Values) for it to work.