I am using the new ASP.NET Identity 2.0 system. I know I can check if a user is in a role like this:
bool isAdmin = UserManager.IsInRole(User.Identity.GetUserId(),
"Customer Account Admin");
I guess this code can be written to check before certain code is run but what about the [Authorize] attribute. I used to be able say
[Authorize(Role="Customer Account Admin")]
This doesn't work anymore because I am not using the old membership or Role Management anymore. How can I put the two together? Or how do I guard against certain parts of the application not being available to members of the right role?