From 39dd578db7fc95bf3be54166229811d4fb421eb8 Mon Sep 17 00:00:00 2001 From: simith Date: Wed, 30 Jul 2014 11:25:00 -0400 Subject: [PATCH] Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC QA Follow up This patch will stop a person without access hitting the url directly and being able to change their messaging preferences. Signed-off-by: Chris Cormack --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt | 8 ++++++-- opac/opac-messaging.pl | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt index 21c40c7..881d8d3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt @@ -5,7 +5,6 @@ [% INCLUDE 'masthead.inc' %] -
+ [% IF (Authorized) %]

Your messaging settings

[% IF ( settings_updated ) %] @@ -120,6 +120,10 @@
+ [% ELSE %] +

You are not allowed to call this page directly

+ To report this problem, you can email the Koha Administrator. + [% END %]
@@ -142,4 +146,4 @@ }); //]]> -[% END %] +[% END %] \ No newline at end of file diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl index 096dbff..74d95ef 100755 --- a/opac/opac-messaging.pl +++ b/opac/opac-messaging.pl @@ -68,6 +68,8 @@ $template->param( BORROWER_INFO => [ $borrower ], messagingview => 1, SMSnumber => defined $borrower->{'smsalertnumber'} ? $borrower->{'smsalertnumber'} : $borrower->{'mobile'}, SMSSendDriver => C4::Context->preference("SMSSendDriver"), - TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification") ); + TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification"), + admin => C4::Context->preference('KohaAdminEmailAddress'), + Authorized => C4::Context->preference('OPACEnhancedMessagingPreferences')); output_html_with_http_headers $query, $cookie, $template->output; -- 1.9.1