PSPrincipal.IsInRole(String) Method

Definition

Determines if the current principal belongs to a specified rule. If we were able to get a WindowsIdentity then this will perform the check using the WindowsIdentity otherwise this will return false.

public:
 virtual bool IsInRole(System::String ^ role);
public:
 bool IsInRole(Platform::String ^ role);
bool IsInRole(std::wstring const & role);
public bool IsInRole (string role);
abstract member IsInRole : string -> bool
override this.IsInRole : string -> bool
Public Function IsInRole (role As String) As Boolean

Parameters

role
String

Returns

If we were able to get a WindowsIdentity then this will perform the check using the WindowsIdentity otherwise this will return false.

Implements

Applies to