From 218749894fb43f379c7251d79fa70876a5b153a2 Mon Sep 17 00:00:00 2001 From: Andrew Fuerste Henry Date: Thu, 12 Mar 2026 20:02:07 +0000 Subject: [PATCH] Bug 42083: Create distinct permissions --- installer/data/mysql/mandatory/userpermissions.sql | 3 ++- koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc | 7 +++++-- t/Koha/Auth/Permissions.t | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql index 10b8607c47d..6322c2caa4e 100644 --- a/installer/data/mysql/mandatory/userpermissions.sql +++ b/installer/data/mysql/mandatory/userpermissions.sql @@ -50,7 +50,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 4, 'edit_borrowers', 'Add, modify and view patron information'), ( 4, 'list_borrowers', 'Search, list and view patrons'), ( 4, 'merge_borrowers', 'Merge patrons'), - ( 4, 'send_messages_to_borrowers', 'Send messages to patrons'), + ( 4, 'send_messages_to_borrowers_email', 'Send messages to patrons via email'), + ( 4, 'send_messages_to_borrowers_sms', 'Send messages to patrons via sms'), ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'), ( 4, 'view_checkout_history', 'View checkout history'), ( 4, 'view_holds_history', 'View holds history'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index 535d6da6914..3e4a841ee72 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -251,8 +251,11 @@ [%- CASE 'api_validate_password' -%] Validate patron passwords using the API ([% name | html %]) - [%- CASE 'send_messages_to_borrowers' -%] - Send messages to patrons + [%- CASE 'send_messages_to_borrowers_email' -%] + Send messages to patrons via email + ([% name | html %]) + [%- CASE 'send_messages_to_borrowers_sms' -%] + Send messages to patrons via sms ([% name | html %]) [%- CASE 'modify_holds_priority' -%] Modify holds priority diff --git a/t/Koha/Auth/Permissions.t b/t/Koha/Auth/Permissions.t index 32081bc70f4..17a60f19e07 100755 --- a/t/Koha/Auth/Permissions.t +++ b/t/Koha/Auth/Permissions.t @@ -125,7 +125,8 @@ subtest 'superlibrarian tests' => sub { 'CAN_user_acquisition_reopen_closed_invoices' => 1, 'CAN_user_acquisition_vendors_manage' => 1, 'CAN_user_acquisition' => 1, - 'CAN_user_borrowers_send_messages_to_borrowers' => 1, + 'CAN_user_borrowers_send_messages_to_borrowers_email' => 1, + 'CAN_user_borrowers_send_messages_to_borrowers_sms' => 1, 'CAN_user_borrowers_delete_borrowers' => 1, 'CAN_user_borrowers_merge_borrowers' => 1, 'CAN_user_borrowers_edit_borrowers' => 1, -- 2.39.5