I am working on ASP .NET MVC 5 web application. I am using
[Authorize(Roles="administrator")]
public class MyController:Controller{}
Is there a way to dynamically add new authorized roles for the controller? For example retrieve this information from database or something similar, so it be like the following
[Authorize(Roles=db.MyControllerRoles)]
public class MyController:Controller{}