Domino Code Fragment

Code Name*
Restricts who can run which agents
Date*
09/29/1998
Source (or email address if you prefer)*
Jamie Magee
IP address:.
Description*
Restricts who can run this agent to those in at least one of the specified role(s)
Type*
Formula
Categories*
Security
Implementation:
Modify code
Required Client:
4.0
Server:
Limitations:
'Enforce a consistent ACL' must be enabled
Comments:
Add to top of existing formula agent code
Files/Graphics attachments (if applicable): Code:

REM "====================================";
REM "Restricts who can run this agent to those in at least one of the specified role(s).  Note that 'Enforce a consistent ACL' must be enabled for @UserRoles to work locally.";
_roles := "[Admin]";

REM "====================================";
_allowedToRunAgents := (_roles = @UserRoles);
@If(_allowedToRunAgents; ""; @Return(@Prompt([OK]; "Launch Agent"; "You are not authorized to run agents on this database.  Contact your database administrator if you need to run system agents on this database.")));


REM "The normal agent code follows...";