ASP.NET MVC 2 Authorization Regex

Posted by Hurricanepkt on Stack Overflow See other posts from Stack Overflow or by Hurricanepkt
Published on 2010-05-11T21:27:22Z Indexed on 2010/05/11 22:54 UTC
Read the original article Hit count: 192

Filed under:

What i currently have is the following:

namespace AzureCCCMVC.Controllers
{
  [Authorize(Roles="Admin")]
  public class AdminController : Controller
  {
     //Stuff
  }
}

what I want to do is have roles for each client such as

   Roles  { "DEMOAdmin", "GOOGAdmin" , "MSFTAdmin" }

and be able to Authorize The Client name (from URL) and in that role

I know I am doing a horrible job of explaining this... It is possible that I can have users that are users of several clients but only admin's of one ...

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2