diff --git a/api/v1/swagger/paths/holds.json b/api/v1/swagger/paths/holds.json index 7982be3e60..76d6e1ab9d 100644 --- a/api/v1/swagger/paths/holds.json +++ b/api/v1/swagger/paths/holds.json @@ -662,7 +662,7 @@ }, "x-koha-authorization": { "permissions": { - "reserveforothers": "1" + "reserveforothers": "place_holds" } } } diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t index 156dc2fd40..4e7e2cfd29 100644 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -690,11 +690,21 @@ subtest 'pickup_locations() tests' => sub { my $patron = $builder->build_object( { class => 'Koha::Patrons', - value => { userid => 'tomasito', flags => 1 } + value => { userid => 'tomasito', flags => 0 } } ); $patron->set_password( { password => $password, skip_validation => 1 } ); my $userid = $patron->userid; + $builder->build( + { + source => 'UserPermission', + value => { + borrowernumber => $patron->borrowernumber, + module_bit => 6, + code => 'place_holds', + }, + } + ); my $item_class = Test::MockModule->new('Koha::Item'); $item_class->mock(