SecurityCallContext.IsUserInRole(String, String) 方法
定义
验证指定的用户属于指定的角色。Verifies that the specified user is in the specified role.
public:
bool IsUserInRole(System::String ^ user, System::String ^ role);
public bool IsUserInRole (string user, string role);
member this.IsUserInRole : string * string -> bool
Public Function IsUserInRole (user As String, role As String) As Boolean
参数
- user
- String
指定的用户。The specified user.
- role
- String
指定的角色。The specified role.
返回
如果指定的用户是指定的角色的成员,则为 true;否则为 false。true if the specified user is a member of the specified role; otherwise, false.