From 0d4bfa96c59c6d7c8a9bd4a875d73cc67a3e6a31 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 4 Oct 2018 14:24:16 -0300 Subject: [PATCH] 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 --- api/v1/swagger/paths/rotas.json | 2 +- t/db_dependent/api/v1/stockrotationstage.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v1/swagger/paths/rotas.json b/api/v1/swagger/paths/rotas.json index 0cdda30317..5c5fc3b01e 100644 --- a/api/v1/swagger/paths/rotas.json +++ b/api/v1/swagger/paths/rotas.json @@ -71,7 +71,7 @@ }, "x-koha-authorization": { "permissions": { - "borrowers": "1" + "stockrotation": "1" } } } diff --git a/t/db_dependent/api/v1/stockrotationstage.t b/t/db_dependent/api/v1/stockrotationstage.t index c76e9b1891..23da8ebbd0 100644 --- a/t/db_dependent/api/v1/stockrotationstage.t +++ b/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( -- 2.19.0