Mono Class Library: System.Security.Principal.WindowsPrincipal Overview | MembersSystem.Security.Principal.WindowsPrincipal.IsInRole Method |
Return the membership of the current principal in the specified role. [Edit]
|
- role
- The group name. [Edit]
True if the current identity is a member of the specified role, false otherwise. [Edit]
On Unix systems, the role is mapped to Unix groups. For users to be considered to have a certain role, the role must be listed in the Unix groups (the /etc/group file) and it must contain a list of users that belong to that group.For example, if you want to check that the user is in role "USAGNT\\UGR_RBP" the file /etc/group should contain a line like this:
/etc/group Example USAGNT\UGR_RBP:x:300:miguel,don,jon,juliaIn this particular example, the users miguel, don, jon and julia belong to the "USAGNT\UGR_RBP" role.
[Edit]
Namespace: System.Security.Principal
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0