SiteMapProvider.IsAccessibleToUser(HttpContext, SiteMapNode) 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.
Retrieves a Boolean value indicating whether the specified SiteMapNode object can be viewed by the user in the specified context.
public:
virtual bool IsAccessibleToUser(System::Web::HttpContext ^ context, System::Web::SiteMapNode ^ node);
public virtual bool IsAccessibleToUser (System.Web.HttpContext context, System.Web.SiteMapNode node);
abstract member IsAccessibleToUser : System.Web.HttpContext * System.Web.SiteMapNode -> bool
override this.IsAccessibleToUser : System.Web.HttpContext * System.Web.SiteMapNode -> bool
Public Overridable Function IsAccessibleToUser (context As HttpContext, node As SiteMapNode) As Boolean
Parameters
- context
- HttpContext
The HttpContext that contains user information.
- node
- SiteMapNode
The SiteMapNode that is requested by the user.
Returns
true
if security trimming is enabled and node
can be viewed by the user or security trimming is not enabled; otherwise, false
.
Exceptions
Remarks
The default behavior when security trimming is enabled is as described in the following table.
Condition | Return Value |
---|---|
The Roles exists on node and the current user is in at least one of the specified roles.- or - The current thread has an associated WindowsIdentity that has file access to the requested URL and the URL is located within the directory structure for the application.- or - The current user is authorized specifically for the requested URL in the authorization element for the current application and the URL is located within the directory structure for the application. |
true |
None of the preceding conditions is met. | false |
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기