Bug 35980: Check for CAN_user_borrowers_edit_borrowers in more-member.tt
This patch removes edit buttons and add buttons from the more member page if the user does not have CAN_user_borrowers_edit_borrowers
To test:
1. Log in with a user with only 'catalogue' and 'list_borrowers' permissions
2. Search for a patron
3. Notice there are edit and add (pecil and plus icon) buttons in the patron details page
4. You may have to enable some system prefereences like HouseboundModule to fully test
5. Test that things like Additional attributes and identifiers are still displayed
3. Apply patch, restart all, reload the page
4. Notice the edit and add buttons in the patron details page are gone
Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 33c7c8730b
)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
b2ab2e2745
commit
c2014f2949
1 changed files with 36 additions and 14 deletions
|
@ -116,10 +116,12 @@
|
|||
|
||||
<div class="patroninfo-heading">
|
||||
<h3>Contact information</h3>
|
||||
[% IF ( guarantor.borrowernumber ) %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=1&guarantorid=[% guarantor.borrowernumber | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% ELSE %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=1"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
[% IF ( guarantor.borrowernumber ) %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=1&guarantorid=[% guarantor.borrowernumber | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% ELSE %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=1"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</div>
|
||||
|
||||
|
@ -277,7 +279,9 @@
|
|||
[% IF ( housebound_role.housebound_chooser == 1 OR housebound_role.housebound_deliverer == 1 ) %]
|
||||
<div class="patroninfo-heading">
|
||||
<h3>Housebound roles</h3>
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=7"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=7"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% END %]
|
||||
</div>
|
||||
<div class="rows">
|
||||
<ol>
|
||||
|
@ -302,7 +306,9 @@
|
|||
[% ELSE %]
|
||||
<div class="patroninfo-heading">
|
||||
<h3>Housebound roles</h3>
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=7"><i class="fa fa-plus"></i> Add</a>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=7"><i class="fa fa-plus"></i> Add</a>
|
||||
[% END %]
|
||||
</div>
|
||||
[% END %]
|
||||
</div> [% #/ div#houseboundroles %]
|
||||
|
@ -314,7 +320,9 @@
|
|||
[% IF ( attributes_loop ) %]
|
||||
<div class="patroninfo-heading">
|
||||
<h3>Additional attributes and identifiers</h3>
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=4"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=4"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% END %]
|
||||
</div>
|
||||
[% FOREACH attribute IN attributes_loop %]
|
||||
[% IF attribute.class %]
|
||||
|
@ -338,7 +346,9 @@
|
|||
[% ELSE %]
|
||||
<div class="patroninfo-heading">
|
||||
<h3>Additional attributes and identifiers</h3>
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=4"><i class="fa fa-plus"></i> Add</a>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=4"><i class="fa fa-plus"></i> Add</a>
|
||||
[% END %]
|
||||
</div>
|
||||
[% END %]
|
||||
</div> [% # /div#patron-extended-attributes %]
|
||||
|
@ -349,7 +359,9 @@
|
|||
<div id="patron-messaging-prefs" class="patroninfo-section">
|
||||
<div class="patroninfo-heading">
|
||||
<h3>Patron messaging preferences</h3>
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=5"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=5"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% END %]
|
||||
</div>
|
||||
[% INCLUDE 'messaging-preference-form.inc' %]
|
||||
[% IF Koha.Preference('SMSSendDriver') %]
|
||||
|
@ -379,7 +391,9 @@
|
|||
<div id="patron-library-details" class="patroninfo-section">
|
||||
<div class="patroninfo-heading">
|
||||
<h3>Library use</h3>
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=3"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=3"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% END %]
|
||||
</div>
|
||||
<div class="rows">
|
||||
<ol>
|
||||
|
@ -529,7 +543,9 @@
|
|||
[% IF ( patron.B_phone || patron.B_email || patron.contactnote || patron.B_address || patron.B_address2 || patron.B_city || patron.B_zipcode || patron.B_country ) %]
|
||||
<div class="patroninfo-heading">
|
||||
<h3>Alternate address</h3>
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=6"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=6"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% END %]
|
||||
</div>
|
||||
<div class="address">
|
||||
<ul>
|
||||
|
@ -563,7 +579,9 @@
|
|||
[% ELSE %]
|
||||
<div class="patroninfo-heading">
|
||||
<h3 class="inline">Alternate address</h3>
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=6"><i class="fa fa-plus"></i> Add</a>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=6"><i class="fa fa-plus"></i> Add</a>
|
||||
[% END %]
|
||||
</div>
|
||||
[% END %]
|
||||
</div> [% # /div#patron-alternate-address %]
|
||||
|
@ -572,7 +590,9 @@
|
|||
[% IF ( patron.altcontactsurname || patron.altcontactfirstname || patron.altcontactaddress1 || patron.altcontactaddress2 || patron.altcontactaddress3 || patron.altcontactstate || patron.altcontactzipcode || patron.altcontactcountry || patron.altcontactphone ) %]
|
||||
<div class="patroninfo-heading">
|
||||
<h3>Alternative contact</h3>
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=2"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=2"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
|
||||
[% END %]
|
||||
</div>
|
||||
<div class="rows">
|
||||
<ol>
|
||||
|
@ -636,7 +656,9 @@
|
|||
[% ELSE %]
|
||||
<div class="patroninfo-heading">
|
||||
<h3>Alternative contact</h3>
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=2"><i class="fa fa-plus"></i> Add</a>
|
||||
[% IF CAN_user_borrowers_edit_borrowers %]
|
||||
<a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=2"><i class="fa fa-plus"></i> Add</a>
|
||||
[% END %]
|
||||
</div>
|
||||
[% END %]
|
||||
</div> [% # /div#patron-alternative-contact %]
|
||||
|
|
Loading…
Reference in a new issue