Bug 26017: Correct permission check on tools page
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 20 Jul 2020 08:40:00 +0000 (09:40 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 6 Aug 2020 09:37:06 +0000 (11:37 +0200)
The 'Cashup registers' link from the tools page retained an previous
verions of the permission name. This patch corrects it to use the final
name we sebtled on and thus now correctly displays the link when
appropriate.

Test plan
1/ Enable cash registers via the 'UseCashRegisters' system preference
2/ Ensure you are logged in as a user who has the cash management
   cashup permission.
3/ Verify that the 'Cashup registers' option appears on the tools page.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt

index ae4608c..350fd1b 100644 (file)
     <dd>Access files stored on the server, like log files or reports</dd>
     [% END %]
 
-    [% IF ( Koha.Preference('UseCashRegisters') && CAN_user_cash_management_manage_cash_registers ) %]
-        [% IF ( CAN_user_cash_management_manage_cash_registers ) %]
+    [% IF ( Koha.Preference('UseCashRegisters') && CAN_user_cash_management_cashup ) %]
         <dt><a href="/cgi-bin/koha/pos/registers.pl">Cashup registers</a></dt>
-        <dd>Perfrom cashup actions on cash registers</dd>
-        [% END %]
+        <dd>Perform cashup actions on cash registers</dd>
     [% END %]
 
     [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports ) %]