@@ -, +, @@ --- Koha/REST/V1/Patron.pm | 3 ++- api/v1/swagger/paths/holds.json | 2 +- api/v1/swagger/paths/patrons.json | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) --- a/Koha/REST/V1/Patron.pm +++ a/Koha/REST/V1/Patron.pm @@ -24,7 +24,8 @@ use Koha::Patrons; sub list { my $c = shift->openapi->valid_input or return; - my $patrons = Koha::Patrons->search; + # FIXME The limited does not work here, the userenv is not set + my $patrons = Koha::Patrons->search_limited; return $c->render(status => 200, openapi => $patrons); } --- a/api/v1/swagger/paths/holds.json +++ a/api/v1/swagger/paths/holds.json @@ -154,7 +154,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 @@ -44,7 +44,7 @@ }, "x-koha-authorization": { "permissions": { - "borrowers": "1" + "borrowers": "edit_borrowers" } } } @@ -103,7 +103,7 @@ "allow-owner": true, "allow-guarantor": true, "permissions": { - "borrowers": "1" + "borrowers": "edit_borrowers" } } } --