Bugzilla – Attachment 62853 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: REST API - patrons endpoint
Bug-18403-REST-API---patrons-endpoint.patch (text/plain), 2.41 KB, created by
Martin Renvoize (ashimema)
on 2017-04-28 15:31:08 UTC
(
hide
)
Description:
Bug 18403: REST API - patrons endpoint
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2017-04-28 15:31:08 UTC
Size:
2.41 KB
patch
obsolete
>From 1c465e71d20dfc9a4abbda6b15ff9de3731b48b7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 10 Apr 2017 17:34:34 -0300 >Subject: [PATCH] Bug 18403: REST API - patrons endpoint > >There is something wrond here, the userenv is no set and so we cannot >user search_limited. >Should we set the userenv or filter on the libraries using >libraries_where_can_see_patrons? >WAITING FOR FEEDBACK HERE. >--- > Koha/REST/V1.pm | 2 +- > Koha/REST/V1/Patron.pm | 3 ++- > api/v1/swagger/paths/holds.json | 2 +- > api/v1/swagger/paths/patrons.json | 4 ++-- > 4 files changed, 6 insertions(+), 5 deletions(-) > >diff --git a/Koha/REST/V1.pm b/Koha/REST/V1.pm >index e307552..14fb8b8 100644 >--- a/Koha/REST/V1.pm >+++ b/Koha/REST/V1.pm >@@ -157,7 +157,7 @@ achieved by defining the operation as follows: > "x-koha-authorization": { > "allow-owner": true, > "permissions": { >- "borrowers": "1" >+ "borrowers": "edit_borrowers" > } > } > } >diff --git a/Koha/REST/V1/Patron.pm b/Koha/REST/V1/Patron.pm >index 477980e..3b30db3 100644 >--- a/Koha/REST/V1/Patron.pm >+++ b/Koha/REST/V1/Patron.pm >@@ -26,7 +26,8 @@ sub list { > > my $user = $c->stash('koha.user'); > >- my $patrons = Koha::Patrons->search; >+ # FIXME The limited does not work here, the userenv is not set >+ my $patrons = Koha::Patrons->search_limited; > > $c->$cb($patrons, 200); > } >diff --git a/api/v1/swagger/paths/holds.json b/api/v1/swagger/paths/holds.json >index 7d67975..b92d86a 100644 >--- a/api/v1/swagger/paths/holds.json >+++ b/api/v1/swagger/paths/holds.json >@@ -129,7 +129,7 @@ > "allow-owner": true, > "allow-guarantor": true, > "permissions": { >- "borrowers": "1" >+ "borrowers": "edit_borrowers" > } > } > }, >diff --git a/api/v1/swagger/paths/patrons.json b/api/v1/swagger/paths/patrons.json >index 67632e1..aaa2b31 100644 >--- a/api/v1/swagger/paths/patrons.json >+++ b/api/v1/swagger/paths/patrons.json >@@ -25,7 +25,7 @@ > }, > "x-koha-authorization": { > "permissions": { >- "borrowers": "1" >+ "borrowers": "edit_borrowers" > } > } > } >@@ -65,7 +65,7 @@ > "allow-owner": true, > "allow-guarantor": true, > "permissions": { >- "borrowers": "1" >+ "borrowers": "edit_borrowers" > } > } > } >-- >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