Domino bug with WebQueryOpen Agents?

I have discovered an interesting bug in WebQueryOpen agents and wondered if someone else had experienced this same issue.

I have a WebQueryOpen agent that is set to run as web user. The agent gets a collection of documents from a view using the GetAllDocumentsByKey method. The title of the documents is then displayed on the web page.

The problem is this agent is retrieving documents the signed on web user does not have read access to. If the user clicks on the title of the documents (which is a link) they are challenged for username/password which is to be expected because they don’t have read access to the selected document.

I have confirmed the WebQueryOpen agent is running as the signed-on web user by returning the NotesSession.EffectiveUsername.

If the user opens the view (which the GetAllDocumentsByKey uses) directly those documents they don’t have read access to don’t appear in the view (which is the expected behaviour). I have also set the ‘Hide Empty Categories’ option for the view.

Any ideas or is this a known issue?

Thanks.

Alex