From f3c88e6f8cbf15849c6a40ff2d7deb1f2344ef6a Mon Sep 17 00:00:00 2001 From: Brendan Lawlor Date: Fri, 19 Jul 2024 20:51:15 +0000 Subject: [PATCH] Bug 35905: Add permission checks to report results Content-Type: text/plain; charset=utf-8 Test plan: 1. Apply patch 2. Create a report like: select biblionumber from biblio limit 10 2. Run the report 3. Verify batch operations dropdown contains batch modification and deletion 4. Run the report again as a user that has only catalogue and reports permissions 5. Confirm the batch operations drop down only includes Add to list 6. Confirm the records drop down only includes View record Signed-off-by: Roman Dolny Signed-off-by: Marcel de Rooy --- .../modules/reports/guided_reports_start.tt | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 9dd38ba53b..3030567303 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -1088,12 +1088,14 @@ [% FOREACH header_ro IN header_row %] [% IF header_ro.has_biblionumbers && ( header_ro.cell == 'biblionumber' || header_types.item( header_ro.cell ) == 'biblionumber' ) %] -
  • - Batch record modification -
  • -
  • - Batch record deletion -
  • + [% IF ( CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel ) %] +
  • + Batch record modification +
  • +
  • + Batch record deletion +
  • + [% END # /IF CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel %]
  • Add to list
  • @@ -1197,8 +1199,10 @@ [% cells.cell | $raw %] -- 2.30.2