From dc7a0840c00f8b912274d07c86afb59c3b027d86 Mon Sep 17 00:00:00 2001 From: Vitor FERNANDES Date: Wed, 19 Dec 2012 18:39:10 +0000 Subject: [PATCH] [SIGNED-OFF] Bug 9254: Problem with EnhancedMessagingPreferences First I don't know the right component to this bug. The problem is the following: - when enabling EnhancedMessagingPreferences, the staff client if able to set the messaging preferences for the patrons categories, and then for the patron (normally the messaging preferences are the same for everyone) - when enabling EnhancedMessagingPreferences, the patrons can set in the OPAC their messaging preferences, which can be against the library rules Solution: - enabling EnhancedMessagingPreferences, should allow the the staff client to set the patrons messaging preferences - enabling EnhancedMessagingPreferences, should't allow patrons to set their messaging preferences (the link doesn't appear in the usermenu.inc) - should be another preference to allow the patrons to set their messaging preferences. Test plan: - apply the patch - enable EnhancedMessagingPreferences, the messaging page should appear in OPAC - disable OPACEnhancedMessagingPreferences, the messaging page shouldn't appear in OPAC - disable EnhancedMessagingPreferences, the messaging page shouldn't appear in OPAC Sponsored-by: KEEP SOLUTIONS Signed-off-by: Kyle M Hall Signed-off-by: Bernardo Gonzalez Kriegel Rebased on master (2013-02-01) --- C4/Auth.pm | 1 + installer/data/mysql/sysprefs.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/modules/admin/preferences/patrons.pref | 8 +++++++- koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 2 +- 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 92f1d4c..4fdbf74 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -316,6 +316,7 @@ sub get_template_and_user { $template->param( "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, EnhancedMessagingPreferences => C4::Context->preference('EnhancedMessagingPreferences'), + OPACEnhancedMessagingPreferences => C4::Context->preference('OPACEnhancedMessagingPreferences'), GoogleJackets => C4::Context->preference("GoogleJackets"), OpenLibraryCovers => C4::Context->preference("OpenLibraryCovers"), KohaAdminEmailAddress => "" . C4::Context->preference("KohaAdminEmailAddress"), diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 7e9f43d..a721d27 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -408,3 +408,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free'); INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserCSS', '', NULL, 'Add CSS to be included in the SCO module in an embedded