How do I prevent particular users from using certain commands?
Use ClearTrigger to prevent users from executing various commands. In the Commands section of clearbits.txt add to command inhibited users lists or add region inhibited users to the Enterprise Section of the clearbits.txt.
Restricting users by command(command section):
A similar command keys like the ones below to command section with the command inhibited user field poplated.
- pre_checkin;R;;0;0;0;D; (administrator) (jdoe) ;
- pre_unlock pre_rmver;R;;0;0;0;D; (rramesh) (tsmith) ;
- pre_rmbranch;R;brtype ;0;0;0;D; (rramesh) (tsmith) ;
- pre_MODIFY_MD;R;;0;0;0;D; (rmoore) (pherman) ;
Adding an entry like the ones above to the command inhibited user field would produce a dialog box like below when a inhibited user attempts an inhibited command…
Allowing only select users by command(command section):
A similar command keys like the ones below to command section with the command allowed user field populated.
- pre_checkout;R;;0;0;0;A; (cclarke) (rcarter) ;
- pre_unlock pre_rmver;R;;0;0;0;A; (rramesh) (tsmith) ;
- pre_rmbranch;R;brtype ;0;0;0;A; (rramesh) (tsmith) ;
- pre_MODIFY_MD;R;;0;0;0;A; (rmoore) (pherman) ;
Adding an entry like the ones above to the command inhibited user field would produce a dialog box like below when a any user not in the list attempts the command…
… or the policy maker could use the ClearTrigger command GUI options to get a more customized dialog without having to write code:
- pre_unlock pre_rmver;R;;0;0;0;D; (rsmith) (jdoe) ;N; ;0;;;;;0;Q;I don’t want you to do this…;C;
- pre_MODIFY_MD;R;;0;0;0;D; (rramesh) (tsmith) ;N;;0;;;;;0;Q;I don’t want you to do this…;C;
Adding an entry like the ones above to the command GUI dialog definition would produce a dialog box like below when a inhibited user attempts an inhibited command.
Restricting users by region (enterprise section):
Populate the region inhibited users field like the one below in the enterprise section of the clearbits file:
- ; (fred) (jgardner) ;
Adding an entry like the one above to the region inhibited field would produce a dialog box like below for any data modifying action that might be attempted by “fred” or “jgardner”.
Remember! The ClearBits_File Web Generator for ClearTrigger makes this even easier.