RoleGroupCollection.GetMatchingRoleGroup(IPrincipal) 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.
Returns the first role group that contains the specified user account.
public:
System::Web::UI::WebControls::RoleGroup ^ GetMatchingRoleGroup(System::Security::Principal::IPrincipal ^ user);
public System.Web.UI.WebControls.RoleGroup GetMatchingRoleGroup (System.Security.Principal.IPrincipal user);
member this.GetMatchingRoleGroup : System.Security.Principal.IPrincipal -> System.Web.UI.WebControls.RoleGroup
Public Function GetMatchingRoleGroup (user As IPrincipal) As RoleGroup
Parameters
- user
- IPrincipal
An IPrincipal that represents the user account to find the role group collection.
Returns
A RoleGroup representing the first role group in the collection that contains the specified user account. If the user is not part of a role group in the collection, it returns null
.
Exceptions
user
is null
.
Remarks
The GetMatchingRoleGroup method searches the role group collection and returns the first role group that contains the specified user account. The method searches the collection in the order role groups are added to the collection, and returns only the first matching role group.
If the specified user account is not part of any of the role groups in the collection, null
is returned.
You must configure role management to use the GetMatchingRoleGroup method. For more information, see Understanding Role Management.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기