Bug 42083

Summary: Email and SMS messages from patron record should have distinct permissions
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: NoticesAssignee: Andrew Fuerste-Henry <andrew>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Crowdfunding committed: 0
Crowdfunding contact: Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 40933, 29393    
Bug Blocks:    
Attachments: Bug 42083: Create distinct permissions
Bug 42083: atomicupdate for permissions
Bug 42083: Implement distinct permissions
Bug 42083: add exec to atomicupdate

Description Andrew Fuerste-Henry 2026-03-12 19:43:47 UTC
Bug 29393 added the ability to send email from a patron's record. 40933 expanded that to SMS. But they currently share a single permission. It would be preferable for those to be two distinct permissions.
Comment 1 Andrew Fuerste-Henry 2026-03-12 23:07:44 UTC
Created attachment 195239 [details] [review]
Bug 42083: Create distinct permissions
Comment 2 Andrew Fuerste-Henry 2026-03-12 23:07:47 UTC
Created attachment 195240 [details] [review]
Bug 42083: atomicupdate for permissions
Comment 3 Andrew Fuerste-Henry 2026-03-12 23:07:49 UTC
Created attachment 195241 [details] [review]
Bug 42083: Implement distinct permissions

To test:
1 - have an staff account with 'send_messages_to_borrowers' permission but not top level 'borrowers' permission
2 - have a value in SMSSendDriver system preference
3 - log in under your staff account and confirm you can send both email and SMS messages from the Add Message button on a patron record

4 - apply patch, updatedatabase, restart_all

5 - confirm your staff account now has 'send_messages_to_borrowers_email' permission rather than 'send_messages_to_borrowers'
6 - confirm your staff account can now only send email messages from the Add Message button on a patron record
7 - add 'send_messages_to_borrowers_sms' permission to your staff account
8 - confirm your staff account can now send both email and sms messages from the Add Message button on a patron record
9 - remove 'send_messages_to_borrowers_email' from your staff account
10 - confirm your staff account can now only send sms messages from the Add Message button on a patron record
Comment 4 Andrew Fuerste-Henry 2026-03-12 23:12:25 UTC
Created attachment 195242 [details] [review]
Bug 42083: add exec to atomicupdate