1
I am creating a system using Asp.Net MVC and before I start I need to do profile-based security. I’ll have multiple profiles each with an access option. For example: Admin Profile (access all), Common Profile (restricted access), Advanced Profile (some administrative access), etc.
I thought to create the profile and create the modules (methods or controllers) for the profile and through a true/false Boolean give permissions to the profile and then put the profile to the user, this would be the simplest way to do it. However, I don’t know how to do this by checking whether the method/controller is allowed or not by the profile to have access as for example to lower an account q would be just the Admin profile that could do, or as a low sale that the Advanced Profile could Fz tbm along with the Administrator.
How to do that ? What do you suggest ?
you have some example a little more detailed ?
– Denilson Carlos
What level of detail do you need? Because I think, with what you’ve specified, it solves, just create an administrative panel for this, some tables in the database and that’s it. Here = https://docs.microsoft.com/pt-br/aspnet/mvc/overview/older-versions/hands-on-labs/aspnet-mvc-4-custom-action-filters here’s an example that might help you.
– Cassio Alves
You will have to adapt the logic to what you need. If it’s not something big, this will solve well.
– Cassio Alves
Thank you very much helped me
– Denilson Carlos