title: MVC 4 - RoleProvider to manage authenticated users permissions with different scopes
body: <p>Here is my problem with my MVC 4 Internet project using Forms Authentication.
  Lets say i have hotels and i want the authorized users accessing each under different roles.</p>
  
  <p>So the user logs in. Then from a dropdownlist selects the target Hotel and the application´s security responds accordingly.</p>
  
  <p>I would need something like [Authorize(Roles = "Administrator")] but only in that hotel scope.</p>
  
  <p>My first aproach was inheriting from AuthorizeAttribute and override AuthorizeCore like is shown in this  <a href="https://stackoverflow.com/questions/11037213/asp-net-mvc-attribute-to-only-let-user-edit-his-her-own-content">thread</a></p>
  
  <p>From there I could get the HttpContext.Session["HotelId"] and query a UserRolesInHotel table. That said, I should have my own roles table with a structure similiar to UserId, RoleId, HotelId. So SimpleRolePrivider comes short to this task and i would be forced to create a CustomeRoleProvider. RoleProvider Methods don´t handle extra params as I need like HotelId when adding a new role to a user.</p>
  
  <p>For clarification:</p>
  
  <ol>
  <li>User A logs in with user/password ->OK (SimpleMembershipProvider)</li>
  <li>Authenticated User A selects Hotel 1 -> User A is an "Administrator" for Hotel 1. </li>
  <li>Authenticated User A change to Hotel 2 -> User A is a "User" in Hotel 2</li>
  </ol>
  
  <p>I can have any number of hotels.</p>
  
  <ol>
  <li>User A -> Hotel 1 -> { "Administrator", "User"}</li>
  <li>User A -> Hotel 2 -> { "User" }</li>
  <li>User A -> Hotel 3 -> { "Owner" }</li>
  <li>User A -> Hotel 4 -> { "Administrator" }</li>
  </ol>
  
  <p>The list of roles is always the same.</p>
  
  <p>I´ve been struggling with this implementation for a couple of days and i couldn´t come up with a pratical solution.
  Any thougths would be much appreciated.</p>
  
  <p>Thanks!</p>