Answer the question
In order to leave comments, you need to log in
How to implement authorization by roles in MVC?
According to TK, you need to use forms authentication. I have an account entity that has a Role property, it can take 2 values: User, Admin. Authentication implemented by mail and password. For the admin, I want to display a different view with additional functionality. How can such authorization be implemented?
Answer the question
In order to leave comments, you need to log in
Option 1. Separate url
Option 2. Drop-down list of authorization type
Option 3. During initial authorization (login, pass), determine what kind of user (user or admin) and if admin do additional actions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question