How to hide the Configuration Tab in RT3

Odhiambo Washington was kind enough to forward to me a message he received
from Greg Dickerson back in April 2002 on this very subject (for RT2).
The condition to check rights in RT2 didn’t work with RT3, so it took a
bit of research and trial and error, but I finally got it to work.

How to hide the Configuration Tab in RT3

First copy “/path/to/rt3/share/html/Elements/Tabs” to
"/path/to/rt3/local/html/Elements/Tabs" then open it in your editor and
remove the following code block:

my $basetabs = { A => { title => loc(‘Homepage’),
path => ‘’,
},
B => { title => loc(‘Tickets’),
path => ‘Search/Listing.html’
},
E => { title => loc(‘Configuration’),
path => ‘Admin/’
},
K => { title => loc(‘Preferences’),
path => ‘User/Prefs.html’
},
P => { title => loc(‘Approval’),
path => ‘Approvals/’
},
};

…and in it’s place add:

my $basetabs;

if ( $session{‘CurrentUser’}->HasRight(Right => ‘SuperUser’,
Object => $RT::System) ) {

$basetabs = { A => { title => loc(‘Homepage’),
path => ‘’,
},
B => { title => loc(‘Tickets’),
path => ‘Search/Listing.html’
},
E => { title => loc(‘Configuration’),
path => ‘Admin/’
},
K => { title => loc(‘Preferences’),
path => ‘User/Prefs.html’
},
P => { title => loc(‘Approval’),
path => ‘Approvals/’
},
};
} else {
$basetabs = { A => { title => loc(‘Homepage’),
path => ‘’,
},
B => { title => loc(‘Tickets’),
path => ‘Search/Listing.html’
},
K => { title => loc(‘Preferences’),
path => ‘User/Prefs.html’
},
P => { title => loc(‘Approval’),
path => ‘Approvals/’
},
};
}

Once this is working you can just assign your “admin” users the global
right of “SuperUser” and they will see the config link. Regular users
will not.

Enjoy!

Regards,
Bill Gerrard
Daze Networks, Inc.