I am currently doing the following to restrict access to a controller using windows authentication.
[Authorize(Users = @"DOMAIN\first.last")]
public class HomeController : BaseController
{
}
This works fine currently but what I really want to do is:
[Authorize(Roles = @"...")]
But whatever role I entered it didn't work.
I want to set a break-point so I can see which role the currently logged in user has, but I can't do that currently.
Is it possible for me to inherit from Authorize and create my own filter attribute so I can put a break-point in it?
I want to see what role the current user has, so I have to set a breakpoint at the correct spot.
I have this so far:
public class RoleFilter : AuthorizeAttribute
{
}