From 46ae29bb64315a3a1d8a64a00f1086c3113cc389 Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 2 Nov 2022 00:44:25 +0000 Subject: [PATCH] Bug 32064: Add test data for all report subpermissions This patch adds test data to prove that all authorizations for subpermissions are set when only a top level flag is set. To test: 0) Apply patch 1) prove ./t/Koha/Auth/Permissions.t --- t/Koha/Auth/Permissions.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/Koha/Auth/Permissions.t b/t/Koha/Auth/Permissions.t index d4ae1575ed..a11c2a8563 100755 --- a/t/Koha/Auth/Permissions.t +++ b/t/Koha/Auth/Permissions.t @@ -42,7 +42,7 @@ subtest 'normal staff user test' => sub { 'plugins' => 0, 'problem_reports' => 0, 'recalls' => 0, - 'reports' => 0, + 'reports' => 1, 'reserveforothers' => 0, 'self_check' => 0, 'serials' => 0, @@ -58,6 +58,10 @@ subtest 'normal staff user test' => sub { 'CAN_user_staffaccess' => 1, 'CAN_user_circulate' => 1, 'CAN_user_circulate_circulate_remaining_permissions' => 1, + 'CAN_user_reports' => 1, + 'CAN_user_reports_create_reports' => 1, + 'CAN_user_reports_delete_reports' => 1, + 'CAN_user_reports_execute_reports' => 1, }; is_deeply( $authz, $expected, 'Expected permissions generated for normal staff user' ); }; -- 2.30.2