From 45d3068560f790e03b429561eb71fbbe8599c94d Mon Sep 17 00:00:00 2001 From: Lisette Scheer Date: Thu, 29 Aug 2024 22:47:50 +0000 Subject: [PATCH] Bug 37737: [23.11] Fixed report permissions to prevent not allowed duplication --- reports/guided_reports.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index b8a99c0c8b..0d57f7d37b 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -57,7 +57,7 @@ my $usecache = Koha::Caches->get_instance->memcached_cache; my $phase = $input->param('phase') // ''; my $flagsrequired; if ( ( $phase eq 'Build new' ) || ( $phase eq 'Create report from SQL' ) || ( $phase eq 'Edit SQL' ) - || ( $phase eq 'Build new from existing' ) ) { + || ( $phase eq 'Build new from existing' ) || ( $phase eq 'Create report from existing' ) ) { $flagsrequired = 'create_reports'; } elsif ( $phase eq 'Use saved' ) { @@ -66,8 +66,10 @@ elsif ( $phase eq 'Use saved' ) { elsif ( $phase eq 'Delete Saved' ) { $flagsrequired = 'delete_reports'; } +elsif ( $phase eq 'Run this report') { + $flagsrequired = 'execute_reports'; +} else { - $flagsrequired = '*'; } my ( $template, $borrowernumber, $cookie ) = get_template_and_user( -- 2.39.2