From 2954fbc9cc945b79ce4944b12b724bb14c040434 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 15 Jul 2022 17:05:51 +0100 Subject: [PATCH] Bug 30335: (follow-up) Bind new permissions to pages and tabs This patch binds the new permissions added in the previous patch to the tab display on the borrower account page. Test plan 1) Apply the previous patch and run the database update 2) Configure a user without the new permissions 3) Confirm the 'Create manual invoice' and 'Create manual credit' tabs no longer appear under the 'Accounting' area when logged in as the above user. 4) Confirm that you cannot manually navigate to /members/mancredit.pl or /members/maninvoice.pl when logged in as the above user. 5) Confirm that users with the above permissions are still able to see the tabs and take actions on them. Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt | 2 ++ koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt | 2 ++ koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt | 4 ++++ members/mancredit.pl | 2 +- members/maninvoice.pl | 2 +- 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index ab942cd67e..22f021b78c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -52,8 +52,12 @@
[% INCLUDE 'renew_results.inc' renew_results=renew_results %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt index b2ae0cc3f0..1ef7897747 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt @@ -45,7 +45,9 @@
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt index afb1fff0f7..b3ddd17c2c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt @@ -48,7 +48,9 @@
  • Transactions
  • Make a payment
  • Create manual invoice
  • + [% IF CAN_user_updatecharges_manual_credit %]
  • Create manual credit
  • + [% END %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt index eb2875149f..352795f109 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -47,8 +47,12 @@
    diff --git a/members/mancredit.pl b/members/mancredit.pl index 7ec9b957b2..58a8e9b3f3 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -45,7 +45,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( type => "intranet", flagsrequired => { borrowers => 'edit_borrowers', - updatecharges => 'remaining_permissions' + updatecharges => 'manual_credit' } } ); diff --git a/members/maninvoice.pl b/members/maninvoice.pl index d194bdd299..4bee132645 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -50,7 +50,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( type => "intranet", flagsrequired => { borrowers => 'edit_borrowers', - updatecharges => 'remaining_permissions' + updatecharges => 'manual_invoice' } } ); -- 2.39.5