Bugzilla – Attachment 137779 Details for
Bug 30335
Add ability to hide/disable manual invoices and manual credits in patron accounts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30335: (follow-up) Bind new permissions to pages and tabs
Bug-30335-follow-up-Bind-new-permissions-to-pages-.patch (text/plain), 6.84 KB, created by
Martin Renvoize (ashimema)
on 2022-07-15 16:11:46 UTC
(
hide
)
Description:
Bug 30335: (follow-up) Bind new permissions to pages and tabs
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-07-15 16:11:46 UTC
Size:
6.84 KB
patch
obsolete
>From 0fc1e6863cd0c9838c4d44648a6ca82ad3c0bb6a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >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 <martin.renvoize@ptfs-europe.com> >--- > 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 @@ > <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 %] >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 @@ > <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"> >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 @@ > <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"> > >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 @@ > <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"> > >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.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30335
:
132031
|
136796
|
137777
|
137778
|
137779
|
137784
|
137845
|
137846
|
137847
|
137848