From 778d8be39fc6aa1cb711a09649fb2de5e3456c28 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 13 May 2020 18:33:00 -0300 Subject: [PATCH] Bug 25494: Remove warnings in advanced editor macros routes There's a couple leftover 'warn's in the controller code. This patch removes that. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/advanced_editor_macros.t => FAIL: Two numbers are warned 2. Apply this patch and repeat 1 => SUCCESS: No more warns 3. Sign off :-D --- Koha/REST/V1/AdvancedEditorMacro.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Koha/REST/V1/AdvancedEditorMacro.pm b/Koha/REST/V1/AdvancedEditorMacro.pm index 92077713cc5..8cb4cb3833c 100644 --- a/Koha/REST/V1/AdvancedEditorMacro.pm +++ b/Koha/REST/V1/AdvancedEditorMacro.pm @@ -75,8 +75,7 @@ sub get { error => "This macro is shared, you must access it via advanced_editor/macros/shared" }); } - warn $macro->borrowernumber; - warn $patron->borrowernumber; + if( $macro->borrowernumber != $patron->borrowernumber ){ return $c->render( status => 403, openapi => { error => "You do not have permission to access this macro" -- 2.26.2