From 810e761660d7424b097a6c6f1d1211513889fa09 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 13 May 2020 19:07:17 -0300 Subject: [PATCH] Bug 25482: Wrong permissions specification for adv editor macros The current permissions are defined as a hash, with a duplicate key. This is generally invalid, but Debian 9's Mojolicious::Plugin::OpenAPI lets it go through, even though the results are, random? This patch sets the required permissions right, and following the haspermissions() syntax correctly. Tests for searching macros are not passing. Still trying to figure. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- api/v1/swagger/paths/advancededitormacros.json | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/api/v1/swagger/paths/advancededitormacros.json b/api/v1/swagger/paths/advancededitormacros.json index 120d14d64b..2fa8f2034a 100644 --- a/api/v1/swagger/paths/advancededitormacros.json +++ b/api/v1/swagger/paths/advancededitormacros.json @@ -178,8 +178,10 @@ }, "x-koha-authorization": { "permissions": { - "editcatalogue": "advanced_editor", - "editcatalogue": "create_shared_macros" + "editcatalogue": { + "advanced_editor": 1, + "create_shared_macros": 1 + } } } } @@ -457,8 +459,10 @@ }, "x-koha-authorization": { "permissions": { - "editcatalogue": "advanced_editor", - "editcatalogue": "create_shared_macros" + "editcatalogue": { + "advanced_editor": 1, + "create_shared_macros": 1 + } } } }, @@ -512,8 +516,10 @@ }, "x-koha-authorization": { "permissions": { - "editcatalogue": "advanced_editor", - "editcatalogue": "delete_shared_macros" + "editcatalogue": { + "advanced_editor": 1, + "delete_shared_macros": 1 + } } } } -- 2.20.1