Bug 22724: Allow only users with correct permissions to 'Write off selected'
authorHayley Mapley <hayleymapley@catalyst.net.nz>
Wed, 8 May 2019 03:39:33 +0000 (15:39 +1200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 30 May 2019 20:22:12 +0000 (21:22 +0100)
commit776151fdf31b292574e4c0bb0c4f185f59c8a218
tree1c8557e43a20bbc8087d97e9b820695ee27dc167
parent9c411575078b529e57e98c808ab7eb2facef1e65
Bug 22724: Allow only users with correct permissions to 'Write off selected'

Due to the addition of a 'Write off selected' button in 18.11, users without
writeoff permissions could mistakenly view and action the 'Write off
selected' option for a patron in Accounting > Make a payment (Fines > Pay fines).
The attached patch corrects this error.

Test plan:
1) Make sure that a staff user has '(writeoff) Write off fines and fees'
permission disabled
2) Bring up a patron with an unpaid fee, go to Accounting -> Make a
payment
3) Note that 'Write off selected' button is displayed.
4) Select a fee, click 'Write off selected'. Note that staff member has
access to 'Write off an amount toward selected fines'
5) Apply the patch
6) Repeat steps 1-2, and note that the button is no longer displayed
7) Bonus points, as a staff user with writeoff permissions enabled check
that all four buttons (Pay amount, Pay selected, Write off all, Write
off selected) are displayed

Sponsored-by: Catalyst IT
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d36566d6eaa9dd02528bbd1219747ccfd4e6b531)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt