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 25, 2008 18:34
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 25, 2008 18:43
* 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.