How do I design the retrieval and processing of all user roles?
问题 I am building an intranet with ASP.NET core 2.0 MVC. All users are part of an active directory. Additionaly I have a MSSQL database with the following tables: Users (Id, FirstName, UserNameAd (unique), ...) Roles (Id, RoleName) UserRoles (User_Id, Role_Id) In my web application I now want to retrieve the roles of a user and store them in the Authentication/Identity Classes of Microsoft in order to use [Authenticate(Roles="Admin")] stuff. I am not sure where I shall put this role-request and