title: MVC Authorization - Store Action & Roles authorization inside database
body: <p>I am still quite new to MVC, and still trying to wrap my head around the security of MVC.</p>
  
  <p>At the moment, it seems that each 'Action' in controller is restricted by the Roles/Users values listed in the 'Authorize' attribute if present. In a way, this is hardcoded, and will require code change each time the roles link to each controller 'Action' is changed.</p>
  
  <p>I am wondering, is there a way I can use a database to store these values, and retrieve it dynamically instead?</p>
  
  <p>Eg of tables in DB :
  - Table to store Action/Role links
  - Table to store all Actions
  - Table to store all Roles
  - Table to store Role/User links
  - Table to store all Users</p>
  
  <p>This way, I need not hardcode the required roles for each 'Action' with an 'Authorize' attribute. A change in DB will suffice.</p>
  
  <p>Is the above possible?</p>
  
  <p>Thanks!</p>