Guided Reports
Reports Dictionary
diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl
index edc17b6984..aa3ea5d9da 100755
--- a/reports/acquisitions_stats.pl
+++ b/reports/acquisitions_stats.pl
@@ -64,7 +64,7 @@ my ($template, $borrowernumber, $cookie)
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports => 1},
+ flagsrequired => {reports => '*'},
debug => 1,
});
our $sep = $input->param("sep");
diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl
index bb17d0ae5c..9a6b173e3a 100755
--- a/reports/bor_issues_top.pl
+++ b/reports/bor_issues_top.pl
@@ -60,7 +60,7 @@ my ($template, $borrowernumber, $cookie)
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports => 1},
+ flagsrequired => {reports => '*'},
debug => 1,
});
our $sep = $input->param("sep");
diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl
index ff5e7824bd..8bc3097b03 100755
--- a/reports/borrowers_out.pl
+++ b/reports/borrowers_out.pl
@@ -56,7 +56,7 @@ my ($template, $borrowernumber, $cookie)
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports => 1},
+ flagsrequired => {reports => '*'},
debug => 1,
});
$template->param(do_it => $do_it,
diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl
index b225fdbbbc..9887dfae8d 100755
--- a/reports/borrowers_stats.pl
+++ b/reports/borrowers_stats.pl
@@ -67,7 +67,7 @@ my ($template, $borrowernumber, $cookie)
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports=> 1},
+ flagsrequired => {reports => '*'},
debug => 1,
});
$template->param(do_it => $do_it);
diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl
index 12c8884447..96205a81a5 100755
--- a/reports/cat_issues_top.pl
+++ b/reports/cat_issues_top.pl
@@ -57,7 +57,7 @@ my ($template, $borrowernumber, $cookie)
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { reports => 1},
+ flagsrequired => { reports => '*'},
debug => 1,
});
our $sep = $input->param("sep");
diff --git a/reports/catalogue_out.pl b/reports/catalogue_out.pl
index 18638837d3..ec6a6965f9 100755
--- a/reports/catalogue_out.pl
+++ b/reports/catalogue_out.pl
@@ -51,7 +51,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports => 1},
+ flagsrequired => {reports => '*'},
debug => 1,
});
diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl
index f3b92b3029..220157c984 100755
--- a/reports/catalogue_stats.pl
+++ b/reports/catalogue_stats.pl
@@ -66,7 +66,7 @@ my ($template, $borrowernumber, $cookie)
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports => 1},
+ flagsrequired => {reports => '*'},
debug => 1,
});
$template->param(do_it => $do_it);
diff --git a/reports/dictionary.pl b/reports/dictionary.pl
index 2c87a496a3..5bbc473803 100755
--- a/reports/dictionary.pl
+++ b/reports/dictionary.pl
@@ -48,7 +48,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { reports => 1 },
+ flagsrequired => { reports => '*' },
debug => 1,
}
);
diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl
index d0910de534..34484eb15c 100755
--- a/reports/guided_reports.pl
+++ b/reports/guided_reports.pl
@@ -41,19 +41,29 @@ Script to control the guided report creation
my $input = new CGI;
+my $phase = $input->param('phase');
+my $flagsrequired;
+if ( $phase eq 'Build new' ) {
+ $flagsrequired = 'create_report';
+}
+elsif ( $phase eq 'Use saved' ) {
+ $flagsrequired = 'execute_report';
+} else {
+ $flagsrequired = '*';
+}
+
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
{
template_name => "reports/guided_reports_start.tmpl",
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { reports => 1 },
+ flagsrequired => { reports => $flagsrequired },
debug => 1,
}
);
my @errors = ();
-my $phase = $input->param('phase');
if ( !$phase ) {
$template->param( 'start' => 1 );
# show welcome page
diff --git a/reports/issues_avg_stats.pl b/reports/issues_avg_stats.pl
index 4710295427..d37dab0384 100755
--- a/reports/issues_avg_stats.pl
+++ b/reports/issues_avg_stats.pl
@@ -62,7 +62,7 @@ my ($template, $borrowernumber, $cookie)
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports => 1},
+ flagsrequired => {reports => '*'},
debug => 1,
});
our $sep = $input->param("sep");
diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl
index 92cc10dfb7..151637ab3b 100755
--- a/reports/issues_stats.pl
+++ b/reports/issues_stats.pl
@@ -66,7 +66,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports => 1},
+ flagsrequired => {reports => '*'},
debug => 0,
});
our $sep = $input->param("sep");
diff --git a/reports/itemslost.pl b/reports/itemslost.pl
index adf231ed62..547c187e8d 100755
--- a/reports/itemslost.pl
+++ b/reports/itemslost.pl
@@ -41,7 +41,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
query => $query,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { reports => 1 },
+ flagsrequired => { reports => '*' },
debug => 1,
}
);
diff --git a/reports/manager.pl b/reports/manager.pl
index 5572f26ed5..a31f93d158 100755
--- a/reports/manager.pl
+++ b/reports/manager.pl
@@ -35,7 +35,7 @@ my ($template, $borrowernumber, $cookie)
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports => 1},
+ flagsrequired => {reports => '*'},
debug => 1,
});
$template->param(do_it => $do_it,
diff --git a/reports/reports-home.pl b/reports/reports-home.pl
index bfed7a43fe..0b849e9aeb 100755
--- a/reports/reports-home.pl
+++ b/reports/reports-home.pl
@@ -29,7 +29,7 @@ my ($template, $loggedinuser, $cookie)
query => $query,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports => 1},
+ flagsrequired => {reports => '*'},
debug => 1,
});
$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
diff --git a/reports/reservereport.pl b/reports/reservereport.pl
index fa389647f6..1193756f1c 100755
--- a/reports/reservereport.pl
+++ b/reports/reservereport.pl
@@ -51,7 +51,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { reports => 1 },
+ flagsrequired => { reports => '*' },
debug => 1,
}
);
diff --git a/reports/serials_stats.pl b/reports/serials_stats.pl
index ff98f34a14..3143bd09c0 100755
--- a/reports/serials_stats.pl
+++ b/reports/serials_stats.pl
@@ -57,7 +57,7 @@ my ($template, $borrowernumber, $cookie)
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {reports => 1},
+ flagsrequired => {reports => '*'},
debug => 1,
});
diff --git a/reports/stats.screen.pl b/reports/stats.screen.pl
index ed38459524..862c2a232c 100755
--- a/reports/stats.screen.pl
+++ b/reports/stats.screen.pl
@@ -36,7 +36,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
query => $input,
type => "intranet",
authnotrequired => 1,
- flagsrequired => { reports => 1 },
+ flagsrequired => { reports => '*' },
debug => 1,
}
);
--
2.39.5