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 <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
aea63af24a
commit
2954fbc9cc
|
|
@ -52,8 +52,12 @@
|
|||
<ul>
|
||||
<li class="active transactions"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | uri %]">Transactions</a></li>
|
||||
<li class="makepayment"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Make a payment</a></li>
|
||||
[% IF CAN_user_updatecharges_manual_invoice %]
|
||||
<li class="manualinvoice"><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual invoice</a></li>
|
||||
[% END %]
|
||||
[% IF CAN_user_updatecharges_manual_credit %]
|
||||
<li class="manualcredit"><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual credit</a></li>
|
||||
[% END %]
|
||||
</ul>
|
||||
<div class="tabs-container">
|
||||
[% INCLUDE 'renew_results.inc' renew_results=renew_results %]
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@
|
|||
<ul>
|
||||
<li class="transactions"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | uri %]">Transactions</a></li>
|
||||
<li class="makepayment"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Make a payment</a></li>
|
||||
[% IF CAN_user_updatecharges_manual_invoice %]
|
||||
<li class="manualinvoice"><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual invoice</a></li>
|
||||
[% END %]
|
||||
<li class="active manualcredit"><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual credit</a></li>
|
||||
</ul>
|
||||
<div class="tabs-container">
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@
|
|||
<li class="transactions"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | uri %]">Transactions</a></li>
|
||||
<li class="makepayment"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Make a payment</a></li>
|
||||
<li class="active manualinvoice"><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual invoice</a></li>
|
||||
[% IF CAN_user_updatecharges_manual_credit %]
|
||||
<li class="manualcredit"><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual credit</a></li>
|
||||
[% END %]
|
||||
</ul>
|
||||
<div class="tabs-container">
|
||||
|
||||
|
|
|
|||
|
|
@ -47,8 +47,12 @@
|
|||
<ul>
|
||||
<li class="transactions"><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | uri %]">Transactions</a></li>
|
||||
<li class="active makepayment"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Make a payment</a></li>
|
||||
[% IF CAN_user_updatecharges_manual_invoice %]
|
||||
<li class="manualinvoice"><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual invoice</a></li>
|
||||
[% END %]
|
||||
[% IF CAN_user_updatecharges_manual_credit %]
|
||||
<li class="manualcredit"><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual credit</a></li>
|
||||
[% END %]
|
||||
</ul>
|
||||
<div class="tabs-container">
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|||
type => "intranet",
|
||||
flagsrequired => {
|
||||
borrowers => 'edit_borrowers',
|
||||
updatecharges => 'remaining_permissions'
|
||||
updatecharges => 'manual_credit'
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|||
type => "intranet",
|
||||
flagsrequired => {
|
||||
borrowers => 'edit_borrowers',
|
||||
updatecharges => 'remaining_permissions'
|
||||
updatecharges => 'manual_invoice'
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue