The ACL of my database has Anonymous set to No Access with Read Public documents set. I have an Xpage that I set to Public Access. The page displays fine, without having to login, with the exception that the page that is supposed to display a message based on a field in a document that is looked up from a view. The lookup fails if public access is turned on for the xPage. If I turn Public Access off for the xPage then I am of course asked to log in to display the page but the message displays on the page.
Here is the formula that I am using. I have modfied it a bit to help troubleshoot this issue. With Public Access for the xPage set, the code displays a "4" (document not found in the view).
var vw:NotesView = database.getView("Setup");
var doc:NotesDocument = vw.getDocumentByKey("Setup",true);
if (doc != null)
{
try
{
return "1"+doc.getFirstItem("PasswordChangeSuccess").getMIMEEntity().getContentAsText();
}
catch (e)
{ try
{
return "2"+doc.getFirstItem("PasswordChangeSuccess").getText();
}
catch (e)
{
return "3";
}
}
}
else return "4";
I have Public Access set for both the Setup view and the form that displays the Setup view. The PasswordChangeSuccess field is a richtext /MIME field.
I also tried placing a $PublicAccess on the form with no luck. Any idea what is wrong?