Click here to Skip to main content
15,441,434 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good afternoon guys, i have a little challenge. i need help with role based security i:e if you log in as an administrator you'll be able to create new users while other users will not be able to see the module for creating new users.
Posted
Comments
Praveen Kullu 19-Aug-11 12:48pm    
Tag it: Winforms?, Asp.net?

1 solution

C#
WindowsPrincipal principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
bool isLocalAdmin = principal.IsInRole(@"BUILTIN\Administrators");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900