Bug 25835: Include overdues with fines in overdues_report permission

To test:
1 - have a user with circulate_remaining_permissions but not
    overdues_report
2 - confirm user can see and run Overdues with Fines
3 - apply patch
4 - confirm user can no longer see links to Overdues with Fines or load
    the page directly by entering the url
5 - confirm a user with overdues_report or greate permission can see and
    use the tool

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 23de67a7e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9825c7ea36)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Andrew Fuerste Henry 2023-11-29 18:02:52 +00:00 committed by Lucas Gass
parent 9051088ec0
commit 7c9a2beb9d
3 changed files with 5 additions and 5 deletions

View file

@ -42,7 +42,7 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user({
template_name => "circ/branchoverdues.tt",
query => $input,
type => "intranet",
flagsrequired => { circulate => "circulate_remaining_permissions" },
flagsrequired => { circulate => "overdues_report" },
});
my $default = C4::Context->userenv->{'branch'};

View file

@ -109,16 +109,16 @@
</li>
</ul>
[% IF ( CAN_user_circulate_overdues_report ) %]
<h5>Overdues</h5>
<ul>
[% IF ( CAN_user_circulate_overdues_report ) %]
<li>
<a href="/cgi-bin/koha/circ/overdue.pl" title="Warning: This report is very resource intensive on systems with large numbers of overdue items.">Overdues</a>
</li>
[% END %]
<li>
<a href="/cgi-bin/koha/circ/branchoverdues.pl" title="Limited to your library. See report help for other details.">Overdues with fines</a>
</li>
</ul>
[% END %]
</div>
</div>

View file

@ -135,17 +135,16 @@
</li>
</ul>
[% IF ( CAN_user_circulate_overdues_report ) %]
<h3>Overdues</h3>
<ul class="buttons-list">
[% IF ( CAN_user_circulate_overdues_report ) %]
<li>
<a class="circ-button"
href="/cgi-bin/koha/circ/overdue.pl"
title="Warning: This report is very resource intensive on systems with large numbers of overdue items."
><i class="fa fa-clock-o"></i> Overdues</a>
</li>
[% END %]
<li>
<a class="circ-button"
href="/cgi-bin/koha/circ/branchoverdues.pl"
@ -153,6 +152,7 @@
><i class="fa fa-clock-o"></i> Overdues with fines</a>
</li>
</ul>
[% END %]
</div>
</div>
<div class="row" id="intranet-circulation-home-html">