Test plan:
Login with a patron that only have the 'edit_borrowers' permission.
You should be able to access patron's information of patrons inside of your group.
Technical note:
Before this patchset the borrowers permission module contains only 1 permission 'edit_borrowers'.
That meant
borrowers => 1
and
borrowers => '*'
had the same behavior.
Moreover, now that we have 2 permissions, 'CAN_user_borrowers' is set when all
permissions of 'borrowers' are set.
We need to update the different occurrences of these tests.
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
[% IF ( batch_checkout_view ) %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]&batch=1">Batch check out</a></li>
[% END %]
[% END %]
[% IF ( CAN_user_borrowers ) %]
[% IF CAN_user_borrowers_edit_borrowers %]
[% IF ( detailview ) %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Details</a></li>
[% END %]
[% IF ( CAN_user_updatecharges ) %]
@ -83,12 +83,12 @@
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
[% IF Koha.Preference("RoutingSerials") %][% IF ( routinglistview ) %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/members/routing-lists.pl?borrowernumber=[% borrowernumber %]">Routing lists</a></li>[% END %]
[% END %]
[% IF ( CAN_user_borrowers ) %]
[% IF CAN_user_borrowers_edit_borrowers %]
[% IF ( intranetreadinghistory ) %]
[% IF ( readingrecordview ) %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]">Circulation history</a></li>
[% END %]
[% END %]
[% IF ( CAN_user_borrowers ) %]
[% IF CAN_user_borrowers_edit_borrowers %]
[% IF ( intranetreadinghistory ) %]
[% IF ( holdshistoryview ) %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/members/holdshistory.pl?borrowernumber=[% borrowernumber %]">Holds history</a></li>
[% END %]
@ -96,22 +96,22 @@
[% IF ( CAN_user_parameters ) %]
[% IF ( logview ) %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/tools/viewlog.pl?do_it=1&modules=MEMBERS&modules=circulation&object=[% borrowernumber %]&src=circ">Modification log</a></li>
[% END %]
[% IF ( CAN_user_borrowers ) %]
[% IF CAN_user_borrowers_edit_borrowers %]
[% IF ( sentnotices ) %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber %]">Notices</a></li>
[% END %]
[% IF ( CAN_user_borrowers ) %]
[% IF CAN_user_borrowers_edit_borrowers %]
[% IF ( statisticsview ) %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/members/statistics.pl?borrowernumber=[% borrowernumber %]">Statistics</a></li>
[% END %]
[% IF ( CAN_user_borrowers ) %]
[% IF CAN_user_borrowers_edit_borrowers %]
[% IF ( EnableBorrowerFiles ) %]
[% IF ( borrower_files ) %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li>
[% END %]
[% END %]
[% IF ( CAN_user_borrowers ) %]
[% IF CAN_user_borrowers_edit_borrowers %]
[% IF ( suggestionsview ) %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrowernumber %]">Purchase suggestions</a></li>
[% END %]
[% IF CAN_user_borrowers && useDischarge %]
[% IF CAN_user_borrowers_edit_borrowers&& useDischarge %]
[% IF dischargeview %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharges</a></li>
[% IF ( borrower_files ) %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li>
[% END %]
[% IF CAN_user_borrowers && useDischarge %]
[% IF CAN_user_borrowers_edit_borrowers&& useDischarge %]
[% IF dischargeview %]<liclass="active">[% ELSE %]<li>[% END %]<ahref="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li>
<liclass="disabled"><adata-toggle="tooltip"data-placement="left"title="You are not authorized to renew patrons"id="renewpatron"href="#">Renew patron</a></li>
@ -182,10 +182,10 @@ function searchToHold(){
[% ELSE %]
<liclass="disabled"><adata-toggle="tooltip"data-placement="left"title="You are not authorized to set permissions"id="patronflags"href="#">Set permissions</a></li>
[% END %]
[% IF CAN_user_borrowers && useDischarge %]
[% IF CAN_user_borrowers_edit_borrowers&& useDischarge %]