Browse Source

Bug 11897: Use 'stockrotation' permission for the endpoint

This patch makes the tests for 'authorized' session use the
'stockrotation' permission instead of 'superlibrarian'.

The path x-koha-permission is fixed accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
18.11.x
Tomás Cohen Arazi 4 years ago
committed by Nick Clemens
parent
commit
a9248f237d
  1. 2
      api/v1/swagger/paths/rotas.json
  2. 2
      t/db_dependent/api/v1/stockrotationstage.t

2
api/v1/swagger/paths/rotas.json

@ -71,7 +71,7 @@
},
"x-koha-authorization": {
"permissions": {
"borrowers": "1"
"stockrotation": "1"
}
}
}

2
t/db_dependent/api/v1/stockrotationstage.t

@ -139,7 +139,7 @@ subtest 'move() tests' => sub {
sub create_user_and_session {
my $args = shift;
my $flags = ( $args->{authorized} ) ? $args->{authorized} : 0;
my $flags = ( $args->{authorized} ) ? 2 ** 24 : 0; # stockrotation == 24
my $dbh = C4::Context->dbh;
my $user = $builder->build(

Loading…
Cancel
Save