title: Dynamically add roles to authorize attribute for controller
body: <p>I need to enable my admin user to change access permissions for users on the fly, such that they can create new Roles and add permissions to those Roles.</p>
  
  <p>I want to be able to create an <code>Authorize</code> attribute to stick above my controller class that I can add roles to from a database, so that I don't have to 'set' the roles during development, as in <code>[Authorize(Roles="Role1, Role2")]</code> etc.</p>
  
  <p>So something like <code>[Authorize(Roles = GetListOfRoles()]</code></p>
  
  <p>I found this question - <a href="https://stackoverflow.com/questions/24738624/asp-net-mvc-authorize-user-with-many-roles">ASP.NET MVC Authorize user with many roles</a> which does something similar but maybe there's a way to change this such that it gets a list of permissions/roles from the db?</p>