From 034c7c4c8a0e7c7ac17e721b72c17d9901a42622 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 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 --- .../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 50f7a65a4f..8428ff1be5 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 @@ -1085,12 +1085,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
  • @@ -1194,8 +1196,10 @@ [% cells.cell | $raw %] -- 2.39.2