Bugzilla – Attachment 62852 Details for
Bug 18403
Hide patron information if not part of the logged in user library group
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18403: Guarantors
Bug-18403-Guarantors.patch (text/plain), 4.48 KB, created by
Martin Renvoize (ashimema)
on 2017-04-28 15:31:03 UTC
(
hide
)
Description:
Bug 18403: Guarantors
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2017-04-28 15:31:03 UTC
Size:
4.48 KB
patch
obsolete
>From d0368d450f7aef3b6a5eee0f4a1317913befd4c5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 10 Apr 2017 10:23:37 -0300 >Subject: [PATCH] Bug 18403: Guarantors > >Technically a kid from your library group could have a guarantor >attached to another >group of library, let's deal with this case. > >Test plan: >- Create a kid from your library group >- With a superlibrarian staff user create a guarantor that is outside of >the group of >libraries of the kid >- Login with a limited staff user and confirm that on the patron detail >page you do not >see the link to the guarantor detail page. > >Note that you see the firstname and surname of the guarantor >Q. should it be hidden? > >Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 9 ++++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 8 ++++++-- > members/memberentry.pl | 5 ++++- > 3 files changed, 18 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index ca399b6..9f44423 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -415,7 +415,14 @@ $(document).ready(function() { > [% ELSE %] > <li id="contact-details" style="display: none"> > [% END %] >- <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %] >+ <span class="label">Patron #:</span> >+ [% IF guarantorid %] >+ [% IF logged_in_user.can_see_patron_infos( guarantor ) %] >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a> >+ [% ELSE %] >+ [% guarantorid %] >+ [% END %] >+ [% END %] > </li> > [% UNLESS nocontactname %] > <li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 8866a0f..f2083a6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -245,14 +245,18 @@ function validate1(date) { > <span class="label">Guarantees:</span> > <ul> > [% FOREACH guarantee IN guarantees %] >- <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></li> >+ [% IF logged_in_user.can_see_patron_infos( guarantee ) %] >+ <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></li> >+ [% ELSE %] >+ <li>[% guarantee.firstname | html %] [% guarantee.surname | html %]</li> >+ [% END %] > [% END %] > </ul> > </li> > [% ELSIF guarantor %] > <li> > <span class="label">Guarantor:</span> >- [% IF guarantor.borrowernumber %] >+ [% IF guarantor.borrowernumber AND logged_in_user.can_see_patron_infos( guarantor ) %] > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber %]">[% guarantor.firstname | html %] [% guarantor.surname | html %]</a> > [% ELSE %] > [% guarantor.firstname | html %] [% guarantor.surname | html %] >diff --git a/members/memberentry.pl b/members/memberentry.pl >index c6d9ccd..755c4f2 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -740,10 +740,13 @@ $template->param( > check_member => $check_member,#to know if the borrower already exist(=>1) or not (=>0) > "op$op" => 1); > >+$guarantorid = $borrower_data->{'guarantorid'} || $guarantorid; >+my $guarantor = $guarantorid ? Koha::Patrons->find( $guarantorid ) : undef; > $template->param( > nodouble => $nodouble, > borrowernumber => $borrowernumber, #register number >- guarantorid => ($borrower_data->{'guarantorid'} || $guarantorid), >+ guarantor => $guarantor, >+ guarantorid => $guarantorid, > relshiploop => \@relshipdata, > btitle=> $default_borrowertitle, > guarantorinfo => $guarantorinfo, >-- >2.1.4
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 18403
:
62010
|
62011
|
62012
|
62013
|
62014
|
62015
|
62016
|
62017
|
62018
|
62019
|
62020
|
62021
|
62022
|
62023
|
62024
|
62025
|
62026
|
62027
|
62028
|
62029
|
62030
|
62031
|
62032
|
62033
|
62302
|
62303
|
62830
|
62831
|
62832
|
62833
|
62834
|
62835
|
62836
|
62837
|
62838
|
62839
|
62840
|
62841
|
62842
|
62843
|
62844
|
62845
|
62846
|
62847
|
62848
|
62849
|
62850
|
62851
|
62852
|
62853
|
62854
|
62855
|
71392
|
71394
|
71500
|
71501
|
71502
|
71503
|
71504
|
71505
|
71506
|
71507
|
71508
|
71509
|
71510
|
71511
|
71512
|
71513
|
71514
|
71515
|
71516
|
71517
|
71518
|
71519
|
71520
|
71521
|
71522
|
71523
|
71524
|
71525
|
71526
|
71527
|
71528
|
71529
|
71530
|
71767