From 3fbcf5d55026f5784220c1f24f5a8117ba641aec Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 20 Sep 2023 09:31:47 -0400 Subject: [PATCH] Bug 34844: Add manage_item_editor_templates to userpermissions.sql Test Plan: 1) perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only; prove t/Koha/Auth/Permissions.t 2) Note failure 3) Apply this patch 4) perl /kohadevbox/misc4dev/run_tests.pl --run-db-upgrade-only; prove t/Koha/Auth/Permissions.t 5) Tests pass! Signed-off-by: Jonathan Druart Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 5d2f3ffe7d2dfb796a4ec7e0b4503a3266f3ee80) Signed-off-by: Fridolin Somers (cherry picked from commit c580aa20379f0eb864233abed31f78f72c69dc8a) Signed-off-by: Jacob O'Mara --- installer/data/mysql/mandatory/userpermissions.sql | 2 ++ t/Koha/Auth/Permissions.t | 1 + 2 files changed, 3 insertions(+) diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql index 75219c6ec0..dd4abf9da4 100644 --- a/installer/data/mysql/mandatory/userpermissions.sql +++ b/installer/data/mysql/mandatory/userpermissions.sql @@ -56,6 +56,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 9, 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'), ( 9, 'delete_all_items', 'Delete all items at once'), ( 9, 'manage_item_groups', 'Create, update and delete item groups, add or remove items from a item groups'), + ( 9, 'manage_item_editor_templates', 'Update and delete item editor template owned by others'), + ( 9, 'edit_any_item', 'Edit any item regardless of home library'), (10, 'payout', 'Perform account payout action'), (10, 'refund', 'Perform account refund action'), (10, 'discount', 'Perform account discount action'), diff --git a/t/Koha/Auth/Permissions.t b/t/Koha/Auth/Permissions.t index 6b32551472..5fd840770a 100755 --- a/t/Koha/Auth/Permissions.t +++ b/t/Koha/Auth/Permissions.t @@ -157,6 +157,7 @@ subtest 'superlibrarian tests' => sub { 'CAN_user_editcatalogue_edit_items' => 1, 'CAN_user_editcatalogue_fast_cataloging' => 1, 'CAN_user_editcatalogue_manage_item_groups' => 1, + 'CAN_user_editcatalogue_manage_item_editor_templates' => 1, 'CAN_user_editcatalogue' => 1, 'CAN_user_ill' => 1, 'CAN_user_lists_delete_public_lists' => 1, -- 2.39.5