X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=rt3%2Fadduserstort.pl;h=dc64899116de64152c63fcd973dec4e7a4f76dff;hb=4b97eb6c50faeeaa40660b73cd70c17cc572a2c9;hp=899e4ce97981d818428e6a6a4f3b8dcdadf5a5b2;hpb=73a061a41b2fe0b6a0565699c13a109e3faa4cda;p=monitor.git diff --git a/rt3/adduserstort.pl b/rt3/adduserstort.pl index 899e4ce..dc64899 100644 --- a/rt3/adduserstort.pl +++ b/rt3/adduserstort.pl @@ -25,8 +25,13 @@ my $organization = ''; my $address1 = ''; my $city = ''; my $country = ''; +my $priv = 0; -print $ARGV[0]; +if ( $ARGV[0] =~ /priv/ ) +{ + shift @ARGV; + $priv = 1; +} open(USERS_DATA, $ARGV[0]) || die("Could not open file!"); @raw_data=; @@ -37,13 +42,13 @@ foreach $bc_user (@raw_data) ($email_address,$realname,$organization)=split(/\,/,$bc_user); my $UserObj = new RT::User(RT::SystemUser); - print "adding user: $email_address\n"; + # print "adding user: $email_address\n"; $UserObj->Create(Name => $email_address, RealName => $realname, EmailAddress => $email_address, Password => 'Passw0rd', - Organization => $organization, - Privileged => 0); + Organization => $organization, + Privileged => $priv); #Address1 => $address1, #City => $city, #Country => country,