Run Agents Depending On User Role



Download: IT Certifications 101
Inside this exclusive essential guide, our independent experts break down which IT certifications are worth your time and effort, and how to get started obtaining them to further your career— including specific certifications that any cloud or desktop pro should seriously consider.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.
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.";
_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...";
Start the conversation
0 comments