Bug 23607: Make /patrons/:patron_id/account staff only
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> (cherry picked from commit8171c9d05d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit4c681e4e91) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
539e2a3c7f
commit
fa4f00dbbb
|
|
@ -53,8 +53,6 @@
|
|||
}
|
||||
},
|
||||
"x-koha-authorization": {
|
||||
"allow-owner": true,
|
||||
"allow-guarantor": true,
|
||||
"permissions": {
|
||||
"borrowers": "edit_borrowers",
|
||||
"updatecharges": "remaining_permissions"
|
||||
|
|
|
|||
|
|
@ -45,9 +45,10 @@ subtest 'get_balance() tests' => sub {
|
|||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
my ( $patron, $session_id ) = create_user_and_session({ authorized => 0 });
|
||||
my $patron_id = $patron->id;
|
||||
my $account = $patron->account;
|
||||
my ( $patron, $session_id ) = create_user_and_session({ authorized => 1 });
|
||||
my $library = $builder->build_object({ class => 'Koha::Libraries' });
|
||||
my $patron_id = $patron->id;
|
||||
my $account = $patron->account;
|
||||
|
||||
my $tx = $t->ua->build_tx(GET => "/api/v1/patrons/$patron_id/account");
|
||||
$tx->req->cookies({ name => 'CGISESSID', value => $session_id });
|
||||
|
|
@ -235,7 +236,7 @@ subtest 'add_credit() tests' => sub {
|
|||
sub create_user_and_session {
|
||||
|
||||
my $args = shift;
|
||||
my $flags = ( $args->{authorized} ) ? 2**10 : 0;
|
||||
my $flags = ( $args->{authorized} ) ? 1 : 0;
|
||||
|
||||
my $patron = $builder->build_object(
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue