Marius Vasile

Marius Vasile

  • 552
  • 1.9k
  • 145.8k

asp.net core razor pages. Authorize access for group of users

Dec 13 2020 10:39 PM
My project contains several modules, each of it having its own folder in /Pages. The application may be used by several companies and I've already implemented a role base authorization for users but I want to limit access to each project folders for each company.
 
What I have in mind is to have something similar with Roles
 
  1. [Authorize(Roles = "Management,Safety,Issuer,Receiver,IsoCert")]  
but to be able to assign companies codes for accessing folders. How can this be achieved?

Answers (12)