2 ################################################################################
5 # Description: This trigger stops all users except for vobadm and Steve Lipson
6 # (userid to be specified) from checking in PBLs which are
7 # PowerBuilder libraries and should never be checked into a vob.
8 # Why Steve Lipson would want this capability is unknown.
10 # Author: Andrew@DeFaria.com
11 # Created: May 18, 2004
15 # (c) Copyright 2004, Andrew@DeFaria.com, all rights reserved
17 ################################################################################
22 # This will be set in the BEGIN block but by putting them here the become
23 # available for the whole script.
35 # Extract relative path and basename from script name.
36 $0 =~ /(.*)[\/\\](.*)/;
38 $abs_path = (!defined $1) ? "." : File::Spec->rel2abs ($1);
39 $me = (!defined $2) ? $0 : $2;
41 # Check to see if we are running on Windows
42 $windows = ($^O =~ /MSWin/) ? "yes" : "no";
45 $bin_path = "$abs_path";
46 $triggers_path = "$abs_path/../triggers";
47 $lib_path = "$abs_path/../lib";
48 $log_path = "$abs_path/../log";
50 # Add the appropriate path to our modules to @INC array.
51 unshift (@INC, "$lib_path");
56 my $steve_lipson = "sl020353";
57 my $user = $ENV {CLEARCASE_USER};
58 my $pname = $ENV {CLEARCASE_PN};
60 if ($pname =~ /\.pbl$/i and lc ($user) !~ $steve_lipson) {
61 clearmsg "Check in's of pbl's are not allowed except for administrators";