CHECK_MAGIC_PATH.pl Make sure the MAGIC_PATH env. variable is set to the company standard. If not then do not allow new element to be created. | ||
Author | : | A Better Solution, Inc. |
: | support@abs-consulting.com | |
URL | : | https://abs-consulting.com |
Date | : | January 13, 2003 |
This trigger script is expected to be called from a preop trigger.
Notice it is not called from pre-mkelem. This is because the cleartool mkelem command actually calls a cleartool lnname first, so the trigger is appied there and tested to make sure it is being called for a mkelem and not an actual lnname call or for some other command.
The administrator should create an trigger like so (or similar):
cleartool mktrtype -ele -all -pre lnname -c "Only allow element creation when user's MAGIC_PATH env. variable is set to company standard." -exec "{path}/ccperl.exe {path}/CHECK_MAGIC_PATH.pl" CHECK_MAGIC_PATH
If using ClearTrigger, you don't need to write ANY trigger code... Just turn on functionality bit (7) from the list of 25 Functionality Bits in the configuration file.
Read more on Policy without Triggers using ClearTrigger.