db.Search and privileges

A bit of a strange one… I have a script that accesses a database and performs a search for “All docs” after a certain date.

Set doccoll = db.Search( “Select @All”, dateTime, 0 )

The agent signer has Manager access to the databases being searched, and the databases have no roles in the ACL.

When running against most databases, a collection of docs is returned as expected. However, I have come across one or two databases where the script fails at the line above, with the error “Error 4000: Notes error: All privileges are required for this operation”. As mentioned, the databases have no roles in the ACL’s.

What’s even stranger is that if the agent is run with Full-Access Administration rights on the server hosting the database, it works fine :blush:

Has anyone come across this before? Does anyone have any ideas as to the cause?

Subject: db.Search and privileges

Privileges rings a bell from a previous release of Notes, have you checked the other forums?

I have seen this before but so long ago that I can only remember that I found it in a forum, or was in the support site? I’d search for privileges on the support site.

Subject: RE: db.Search and privileges

Many thanks Sue… I have come across issues with Priviliges also, but I can’t understand why they should apply in this case… My understanding of how db.Search works is that it doesn’t refer to any predifined view per se… rather it just looks at the complete document collection within a database… Therefore, it would be easy to assume that assuming you have full access, ie Manager with all permissions, to a database, you should be able to access this document collection (perhaps Read “hidden view”)… I could understand a doc collection returning “no docs” if all docs were hidden by Readers fields that did not cover the signing id, but that should yield a doc count of 0… Instead, I’m seeing an error in agent…