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.
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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);
}
"allow-owner": true,
"allow-guarantor": true,
"permissions": {
- "borrowers": "1"
+ "borrowers": "edit_borrowers"
}
}
},
},
"x-koha-authorization": {
"permissions": {
- "borrowers": "1"
+ "borrowers": "edit_borrowers"
}
}
}
"allow-owner": true,
"allow-guarantor": true,
"permissions": {
- "borrowers": "1"
+ "borrowers": "edit_borrowers"
}
}
}