Hello, I'm having trouble building an architecture in the security-related part of the application. I need only logged-in and authorized users to have access to certain application functions. I know that I would normally use Roles-based authorization, but the problem is that in the business rules of this application are the users (Master) who will create the access profiles, so I do not have to pre-define in the filters what will be the roles that will have access to each controller / action of the application.
Would anyone have a solution to the scenario I described? The architecture will be built on Asp.Net MVC5 C #, with Entity Framework and AutoFac.