From 4d96cf8c3dc73f733ed10e7b2b9d84b9985da5d2 Mon Sep 17 00:00:00 2001 From: Ronaldo Richieri Date: Fri, 8 Dec 2023 11:26:38 -0300 Subject: [PATCH] Hide search and bulk update links on My Assets in self service My Assets is used in self service and in regular RT. Self service users do not have access to the asset query builder, so render links to the search and bulk update only for privileged users. --- share/html/User/Elements/AssetList | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/share/html/User/Elements/AssetList b/share/html/User/Elements/AssetList index 44a328db48d..a4c2eb4516c 100644 --- a/share/html/User/Elements/AssetList +++ b/share/html/User/Elements/AssetList @@ -79,21 +79,23 @@ my $query_string = $m->comp('/Elements/QueryString', Order => $QueryProperties{Order}, ); -my $search_url = - RT->Config->Get('WebPath') . - '/Search/Results.html?' . - $query_string; +my ($search_url, $bulk_update_title, $bulk_update_url); -my $bulk_update_url = - RT->Config->Get('WebPath') . - '/Asset/Search/Bulk.html?' . - $query_string; +if ($session{CurrentUser}->Privileged) { + $search_url = RT->Config->Get('WebPath') . + '/Search/Results.html?' . + $query_string; + $bulk_update_title = loc('Bulk Update'); + $bulk_update_url = RT->Config->Get('WebPath') . + '/Asset/Search/Bulk.html?' . + $query_string; +} <&| /Widgets/TitleBox, title => $Title, title_href => $search_url, - titleright => loc('Bulk Update'), + titleright => $bulk_update_title, titleright_href => $bulk_update_url, class => "user asset-list", &>