I have two agents which modify the acl. They run perfectly when the user executing the agents has manager access. I have also set the security tab in each agent to run on behalf of (userid w/manager access), as I want a user with editor access to be able to run these agents. I currently get an error message "Notes error: You are not authorized to perform that operation (path\dbname.nsf). What else do I need to do to get these agents to run?
Subject: Run on behalf of
on behalf of only applies to web agents and scheduled agents. For agents that are run in the foreground via the Notes Client the rights of the person running the agent are used. If they need to modify the ACL they need Manager rights.
Subject: Run on behalf of
Have the user run code that calls the agent using the RunOnServer method. That may necessitate having the user create an save an “agent parameters” document so you can pass the settings using the ParameterNoteID argument.
Subject: Run on behalf of
Pauls and Stans comments are both very correct - as always.But there is an alternative way that, although it shouldn’t, often works.
Your agent does nothing except to call a 2nd agent.
This 2nd agent is signed by someone with Manager access.
This technique works surprisingly often.