Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. bool IsInGroup(string user, string group)
  2. {
  3. using (var identity = new WindowsIdentity(user))
  4. {
  5. var principal = new WindowsPrincipal(identity);
  6. return principal.IsInRole(group);
  7. }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement