Although it's a bit dated, perhaps this project can give you some tips on how to implement membership administration in ASP.NET MVC:
ASP.NET ASP.NET Membership Starter Kit
Quote
What is Membership in ASP.NET MVC Starter Kit?
The starter kit currently consists of two things:
- A sample website containing the required controllers, models, and views for administering users and roles.
- A library that provides testable interfaces for user administration and amp; roles and specific implementations are those interfaces that have built-in membership and the roles of Asp.Net providers.
Out of the box, the starter kit gives you the following features:
- a list of users
- List of roles
- User Account Information
- Change Email
- Change user roles
Update
To restrict certain operations to specific user roles, you can create these roles using the project that I mentioned earlier, and then decorate your own application controllers and / or actions with the Authorize attribute, referencing the necessary roles:
[Authorize(Roles = "Administrator, HR")] public ActionResult DeleteUser(int UserId) {
This will allow non-administrator or HR users to delete users.
source share