Hi all
There probably is a fairly simple solution to this problem:
Im trying to check if a page is published, but whenever i do GetPage(...) on a page that is not published the users (who lack permissions) is redirected to the login page.
To put this is code:
PageData objPage = GetPage(objPageReference);
if (objPage.CheckPublishedStatus(PagePublishedStatus.Published)){
[...]
}
I never get past GetPage because the user is redirected, so how am i supposed to be able to do this check?
Regards
/Fredrik
You might try
GetPage(objPageReference, EPiServer.Security.AccessControlList.NoAccess);
which will skip the authorization control.
Regards,
Johan Olofsson
ElektroPost