@@ -, +, @@ --- 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(-) --- a/Koha/REST/V1.pm +++ a/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" } } } --- a/Koha/REST/V1/Patron.pm +++ a/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); } --- a/api/v1/swagger/paths/holds.json +++ a/api/v1/swagger/paths/holds.json @@ -129,7 +129,7 @@ "allow-owner": true, "allow-guarantor": true, "permissions": { - "borrowers": "1" + "borrowers": "edit_borrowers" } } }, --- a/api/v1/swagger/paths/patrons.json +++ a/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" } } } --