Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

How to know if the current user has read access to a page?

Vote:
 
How can I find out if the current user has read access to a page's parent? I can't do a "GetPage(currPage.ParentLink).ACL.QueryDistinctAccess(EPiServer.Security.AccessLevel.Read)" because as soon as I try "GetPage(currPage.ParentLink)" on a page which the current user don't have access to, EpiServer will throw an access denied exception.
#12245
Mar 21, 2005 12:27
Vote:
 
You can fetch a page and do your own access checking by calling: PageData page = Global.EPDataFactory.GetPage(myPageRef,EPiServer.Security.AccessControlList.NoAccess);
#13915
Mar 22, 2005 8:36
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.