Privileged users problem (can search other users)

Hello

Maybe someone had the same problem or has an advice for me, I really need help with this one.

We have client users who can log into RT. All of them are privileged users. We need them to see their tickets, see saved searches (saved searches are used in our system default dashboard) and reply to tickets.
We give them some general rights (screenshot 1-2).


The homepage for such users looks good, as we wanted. The only problem that there is Search section where a user can search any other user. A user starts to type any letters and sees a list of users that have these letters in their names (screens 3-4).


How can I remove Search section or restrict search on other users?

We mess around with the menus all the time, usually using callbacks. With those you can add or remove menus and menu items, and even do some of those operations based on the group membership of the current user for priv users. Would that be the sort of thing you were after?

1 Like

Thank you!
We will try to use it.

If it helps, we have a directory path under /opt/rt5 (where our RT5 lives) of local/html/Callbacks/LocalTabs/Elements/Tabs/ and then have two callbacks in here - one called Privileged and the other SelfService. In these you can mess about with menus by doing things like:

my $home = Menu->child('home');
Menu->delete('tickets');
Menu->delete('assets');
$home->delete('new');
my $prefs = Menu->child('preferences');
$prefs->delete('prefs'); 
$home->child( 'new request' =>
                title       => 'Request New Thingy',
                description => 'Request a new thingy custom form',
                path        => '/SelfService/ThingyUI.html'
    );


1 Like

You can determine which group the user is in, and hide elements that they cannot see.

I have created the file

/opt/rt5/local/html/Callbacks/LocalTabs/Elements/Tabs/Privileged

Inserted text into it

Menu->delete(‘search’);

Cler cache

rm -rf /opt/rt5/var/mason_data/obj

And I get
26-12-2022 144627

I need add tags <%init> </%init>

<%init>
        Menu->delete('search');
</%init>

My result code:
If user member group with id 111 then hide menu items.
It work perfect.

<%init>
my $ClientGroup = RT::Group->new(RT->SystemUser);
$ClientGroup->Load(111); #Group with id 111
if ($ClientGroup->HasMemberRecursively($session{'CurrentUser'}->Id)){
	 Menu->delete('sefrch');
	 Menu->delete('tools');
	 Menu->delete('reports');
}
</%init>
1 Like