HideConfigurationTab3: Difference between revisions

From Request Tracker Wiki
Jump to navigation Jump to search
m (2 revisions imported)
 
(No difference)

Latest revision as of 15:11, 6 April 2016

How to hide the Configuration Tab

RT 3.4.x and greater

In RT 3.4, the visibility of the configuration tab is controlled by the ShowConfigTab permission, making this patch no longer necessary.

RT 3.0 and 3.2

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 = {     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/'
                         },
                 };
 
 
 if ( $session{'CurrentUser'}->HasRight(Right => 'SuperUser',  Object => $RT::System) ) {
 
                    $basetabs->{'E'} = { title => loc('Configuration'),
                          path => 'Admin/'
                         };
 }
 
 

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.