Bug 39374

Summary: No way to restrict OPAC users from Sending lists
Product: Koha Reporter: David Cook <dcook>
Component: ListsAssignee: David Cook <dcook>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: brendan, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 39374: Add feature to block sending of lists from OPAC
Bug 39374: Database changes
Bug 39374: Add feature to block sending of lists from OPAC
Bug 39374: Database changes

Description David Cook 2025-03-19 03:00:21 UTC
At the moment, there's no way to prevent OPAC users from Sending lists. 

There are situations where you don't want your OPAC user to be able to generate emails, especially with user-generated content in the comments field.
Comment 1 David Cook 2025-03-20 02:06:53 UTC
Created attachment 179494 [details] [review]
Bug 39374: Add feature to block sending of lists from OPAC

This change adds a system preference OPACDisableSendList which
disables the ability to send lists from the OPAC, and hides the
"Send list" link on the opac-shelves.pl page.

This is useful in situations where you do not want OPAC users to be
able to generate emails to arbitrary addresses with arbitrary comments.

Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Create a public list with at least one record and view it in the OPAC
2. Click "Send list" and note you can fill out boxes for "Email address"
and "Comment"
3. Change syspref OPACDisableSendList to "Don't allow" and click "Send list"
again
4. Note the popup window now says "You do not have permission to send this list."
5. Reload the list web page and notice "Send list" no longer appears on the toolbar
next to "Print list"
Comment 2 David Cook 2025-03-20 02:06:56 UTC
Created attachment 179495 [details] [review]
Bug 39374: Database changes
Comment 3 Brendan Gallagher 2025-03-31 11:57:37 UTC
Created attachment 179983 [details] [review]
Bug 39374: Add feature to block sending of lists from OPAC

This change adds a system preference OPACDisableSendList which
disables the ability to send lists from the OPAC, and hides the
"Send list" link on the opac-shelves.pl page.

This is useful in situations where you do not want OPAC users to be
able to generate emails to arbitrary addresses with arbitrary comments.

Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Create a public list with at least one record and view it in the OPAC
2. Click "Send list" and note you can fill out boxes for "Email address"
and "Comment"
3. Change syspref OPACDisableSendList to "Don't allow" and click "Send list"
again
4. Note the popup window now says "You do not have permission to send this list."
5. Reload the list web page and notice "Send list" no longer appears on the toolbar
next to "Print list"

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 4 Brendan Gallagher 2025-03-31 11:57:40 UTC
Created attachment 179984 [details] [review]
Bug 39374: Database changes

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>