Last post Mar 26, 2009 03:52 PM by gsr80
Mar 25, 2009 07:52 AM|gsr80|LINK
Firstly, I have to say I have recently joined the forums and I have learnt a great deal from this forum over the last month or so. Some excellent information and very helpful video tutorials !
I am after a bit of advice or a shove in the right direction. Basically, I am creating an application that has both manager and normal user roles. Only employees in the manager role are able to administer normal users, i.e. no users can add themselves to
the application. So far, Ive managed to customise the Create User Wizard with an additional step that allows managers to specify a role for the new user during their creation and all this is written to the ASPNETDB successfully. I can also login to the application
with different credentials and have been able to limit access to particular features based on user roles......thats the good part !
Now I want to create a page for managers to be able to work with the data in the ASPNETDB tables. In particular I want managers to be able to:
I have had a few unsuccessful attempts so far and would welcome any advice to help me get this function up and running !
Thanks very much
Mar 25, 2009 01:26 PM|rrmacman|LINK
This website has good section on the membership class. Read http://www.asp.net/learn/security/ , it should help you out.
Mar 25, 2009 07:07 PM|jpcoliveros|LINK
amend user details as appropriate, for example change their roledelete users from the table so they can no longer access the application if they leave the organisation
Most of the functionalities that you need starts with the MembershipAPI. Working with the user accounts are often accessed through the MembershipUser object. You can use something like:
MembershipUser mu = Membership.GetUser(); // this GetUser method has overloads for your convenience
Deleting a user is as simple as:
Membership.DeleteUser // you do the method parameter for this
if you want to change their role, you can use the Roles API (provided you are using the default Role Provider)
Roles.RemoveUserFromRole and Roles.AddUserToRole, etc.
Mar 26, 2009 03:52 PM|gsr80|LINK
Thank you very much for the replies. They've helped me to understand it a bit better , I'll take a closer look at the MembershipAPI and try to get it working.