Meer
Meer

Reputation: 686

ASP.NET MVC User based Privileges for Controller Actions

I have application where I want to grant or prohibited the roles to access the Controller.

Admin can change the the privilege of roles in roles management.

below is pic of role management where admin can change the privilege

How to apply Authorization on Controllers based on these dynamically changing privileges.

Upvotes: 0

Views: 929

Answers (1)

Nicolas Zawada
Nicolas Zawada

Reputation: 507

I think this is exactly what you need. You can create custom policies, in your case a policy per controller where you get the roles from the database in your custom policy.

Upvotes: 2

Related Questions