PSPrincipal.IsInRole(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.