Asp.net mvc user management -


in asp.net mvc default application account controller enable user registration, log in, log out , changing password.

i wondering possible implement litle more enabling administrator delete user or give user different roles in asp.net configuration create user, roles , asign roles users?

i figured out , extend profile users, have more infos , profile picture.

if have experience or examples of user management in asp.net mvc.

although bit outdated, project maybe can give few hints on how implement membership administration in asp.net mvc:

asp.net mvc membership starter kit

quote

what asp.net mvc membership starter kit?

the starter kit consists of 2 things:

  1. a sample website containing controllers, models, , views needed administer users & roles.
  2. a library provides testable interfaces administering users & roles , concrete implementations of interfaces wrap built-in asp.net membership & roles providers.

out of box, starter kit gives following features:

  • list of users
  • list of roles
  • user account info
  • change email address
  • change user's roles

update

for restricting operations specific user roles, can create these roles using project mentioned earlier, , decorate own application's controllers and/or actions authorize attribute, referencing desired roles:

[authorize(roles = "administrator, hr")] public actionresult deleteuser(int userid) {     // } 

this prevent users not administrator or hr delete users.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -