From c261e6a75aff6f58dbd84704a48378a63645e1d3 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 21 Aug 2020 10:59:48 -0300 Subject: [PATCH] Bug 22343: Add parameters => manage_smtp_servers subpermission This patch introduces a new subpermission for managing SMTP servers, for granularity. Signed-off-by: Kyle M Hall --- .../data/mysql/atomicupdate/bug_22343_smtp_servers.perl | 6 ++++++ installer/data/mysql/userpermissions.sql | 1 + 2 files changed, 7 insertions(+) diff --git a/installer/data/mysql/atomicupdate/bug_22343_smtp_servers.perl b/installer/data/mysql/atomicupdate/bug_22343_smtp_servers.perl index 6bbb421c0e..d1211ed541 100644 --- a/installer/data/mysql/atomicupdate/bug_22343_smtp_servers.perl +++ b/installer/data/mysql/atomicupdate/bug_22343_smtp_servers.perl @@ -36,6 +36,12 @@ if( CheckVersion( $DBversion ) ) { }); } + $dbh->do(q{ + INSERT IGNORE INTO permissions + (module_bit, code, description) + VALUES ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'); + }); + # Always end with this (adjust the bug info) NewVersion( $DBversion, 22343, "Add SMTP configuration options"); } diff --git a/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql index 0224a56a79..d5cfbf84de 100644 --- a/installer/data/mysql/userpermissions.sql +++ b/installer/data/mysql/userpermissions.sql @@ -34,6 +34,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 3, 'manage_mana', 'Manage Mana KB content sharing'), ( 3, 'manage_additional_fields', 'Add, edit, or delete additional custom fields for baskets or subscriptions (also requires order_manage or edit_subscription permissions)'), ( 3, 'manage_keyboard_shortcuts', 'Manage keyboard shortcuts for the advanced cataloging editor'), + ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'), ( 4, 'edit_borrowers', 'Add, modify and view patron information'), ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'), ( 6, 'place_holds', 'Place holds for patrons'), -- 2.24.1 (Apple Git-126)