Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IsInRole() [3/4]

override bool System.Security.Principal.WindowsPrincipal.IsInRole ( string role)
inlinevirtual

Reimplemented from System.Security.Claims.ClaimsPrincipal.

Definition at line 56 of file WindowsPrincipal.cs.

57 {
58 if (role == null || role.Length == 0)
59 {
60 return false;
61 }
62 NTAccount identity = new NTAccount(role);
63 IdentityReferenceCollection identityReferenceCollection = new IdentityReferenceCollection(1);
65 IdentityReferenceCollection identityReferenceCollection2 = NTAccount.Translate(identityReferenceCollection, typeof(SecurityIdentifier), forceSuccess: false);
66 if (identityReferenceCollection2[0] is SecurityIdentifier sid && IsInRole(sid))
67 {
68 return true;
69 }
70 return base.IsInRole(role);
71 }
void Add(TKey key, TValue value)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Security.Principal.WindowsPrincipal.IsInRole(), and System.Security.Principal.NTAccount.Translate().

Referenced by System.Security.Principal.WindowsPrincipal.IsInRole(), System.Security.Principal.WindowsPrincipal.IsInRole(), and System.Security.Principal.WindowsPrincipal.IsInRole().