From 84d4c39db3c19b9897db59584cb219f13cfc5318 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Tue, 10 Nov 2020 11:43:24 -0300 Subject: [PATCH] Bug 23019: (follow-up) Fix test permissions and API definition bugs --- api/v1/swagger/paths.json | 4 ++-- api/v1/swagger/paths/import_batch_profiles.json | 12 ++++++------ t/db_dependent/api/v1/import_batch_profiles.t | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/api/v1/swagger/paths.json b/api/v1/swagger/paths.json index ebe8a0bf8a..14894fb546 100644 --- a/api/v1/swagger/paths.json +++ b/api/v1/swagger/paths.json @@ -113,8 +113,8 @@ "/import_batch_profiles": { "$ref": "paths/import_batch_profiles.json#/~1import_batch_profiles" }, - "/import_batch_profiles/{profile_id}": { - "$ref": "paths/import_batch_profiles.json#/~1import_batch_profiles~1{profile_id}" + "/import_batch_profiles/{import_batch_profile_id}": { + "$ref": "paths/import_batch_profiles.json#/~1import_batch_profiles~1{import_batch_profile_id}" }, "/rotas/{rota_id}/stages/{stage_id}/position": { "$ref": "paths/rotas.json#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position" diff --git a/api/v1/swagger/paths/import_batch_profiles.json b/api/v1/swagger/paths/import_batch_profiles.json index db802f492b..588a67d6e4 100644 --- a/api/v1/swagger/paths/import_batch_profiles.json +++ b/api/v1/swagger/paths/import_batch_profiles.json @@ -67,7 +67,7 @@ }, "x-koha-authorization": { "permissions": { - "catalogue": "1" + "tools": "stage_marc_import" } } }, @@ -182,12 +182,12 @@ }, "x-koha-authorization": { "permissions": { - "catalogue": "1" + "tools": "stage_marc_import" } } } }, - "/import_batch_profiles/{profile_id}": { + "/import_batch_profiles/{import_batch_profile_id}": { "put": { "x-mojo-to": "ImportBatchProfiles#edit", "operationId": "editImportBatchProfiles", @@ -196,7 +196,7 @@ ], "parameters": [ { - "$ref": "../parameters.json#/profile_id_pp" + "$ref": "../parameters.json#/import_batch_profile_id_pp" }, { "name": "body", @@ -302,7 +302,7 @@ }, "x-koha-authorization": { "permissions": { - "catalogue": "1" + "tools": "stage_marc_import" } } }, @@ -311,7 +311,7 @@ "operationId": "deleteImportBatchProfiles", "tags": ["ImportBatchProfiles"], "parameters": [{ - "$ref": "../parameters.json#/profile_id_pp" + "$ref": "../parameters.json#/import_batch_profile_id_pp" } ], "produces": ["application/json"], diff --git a/t/db_dependent/api/v1/import_batch_profiles.t b/t/db_dependent/api/v1/import_batch_profiles.t index cda2f2da47..83b1eb1e39 100755 --- a/t/db_dependent/api/v1/import_batch_profiles.t +++ b/t/db_dependent/api/v1/import_batch_profiles.t @@ -46,7 +46,7 @@ subtest 'list profiles' => sub { { class => 'Koha::Patrons', value => { - flags => 1 + flags => 13 } } ); @@ -77,7 +77,7 @@ subtest 'add profile' => sub { { class => 'Koha::Patrons', value => { - flags => 1 + flags => 13 } } ); @@ -112,7 +112,7 @@ subtest 'edit profile' => sub { { class => 'Koha::Patrons', value => { - flags => 1 + flags => 13 } } ); @@ -153,7 +153,7 @@ subtest 'delete profile' => sub { { class => 'Koha::Patrons', value => { - flags => 1 + flags => 13 } } ); -- 2.25.0