From 3ef62a0570055da710328937e7f65dbb2c027c62 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 12 Aug 2002 06:17:09 +0000 Subject: import rt 2.0.14 --- rt/bin/rtadmin | 1040 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1040 insertions(+) create mode 100644 rt/bin/rtadmin (limited to 'rt/bin/rtadmin') diff --git a/rt/bin/rtadmin b/rt/bin/rtadmin new file mode 100644 index 000000000..25ba1b06a --- /dev/null +++ b/rt/bin/rtadmin @@ -0,0 +1,1040 @@ +#!!!PERL!! -w +# +# $Header: /home/cvs/cvsroot/freeside/rt/bin/Attic/rtadmin,v 1.1 2002-08-12 06:17:07 ivan Exp $ +# RT is (c) 1996-2001 Jesse Vincent + +use strict; +use Carp; +use Getopt::Long qw(:config pass_through); + +use lib "!!RT_LIB_PATH!!"; +use lib "!!RT_ETC_PATH!!"; + +use RT::Interface::CLI qw(CleanEnv LoadConfig DBConnect + GetCurrentUser GetMessageContent); + +#Clean out all the nasties from the environment +CleanEnv(); + +#Load etc/config.pm and drop privs +LoadConfig(); + +#Connect to the database and get RT::SystemUser and RT::Nobody loaded +DBConnect(); + +#Drop setgid permissions +RT::DropSetGIDPermissions(); + +#Get the current user all loaded +my $CurrentUser = GetCurrentUser(); + +unless ($CurrentUser->Id) { + print "No RT user found. Please consult your RT administrator.\n"; + exit(1); +} + + + + +PickMode(); + + +# {{{ Help + +sub Help { + + # {{{ help_acl +my $help_acl =" + Access control + --grant-right + --revoke-right + --userid + --groupid + --list-rights"; + +# }}} + + # {{{ help_keyword_sel +my $help_keyword_sel = " + Keyword Selections + --add-keyword-select + --modify-keyword-select + --ks-name + --ks-keyword + --ks-single + --ks-multiple + --ks-depth + + --disable-keyword-select "; +# }}} + + # {{{ help_scrip +my $help_scrip = " + Scrips + --create-scrip + --scrip-condition + --scrip-action + --scrip-template