Bugzilla – Attachment 44302 Details for
Bug 12528
Enable staff to deny message setting access to patrons on the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC
Bug-12528---Enable-staff-to-deny-message-setting-a.patch (text/plain), 6.66 KB, created by
Bouzid Fergani
on 2015-11-02 21:54:52 UTC
(
hide
)
Description:
Bug 12528 - Enable staff to deny message setting access to patrons on the OPAC
Filename:
MIME Type:
Creator:
Bouzid Fergani
Created:
2015-11-02 21:54:52 UTC
Size:
6.66 KB
patch
obsolete
>From c4f325bb759e1d6d642c01ce167c0213dd8e5354 Mon Sep 17 00:00:00 2001 >From: Bouzid Fergani <bouzid.fergani@inlibro.com> >Date: Mon, 2 Nov 2015 16:45:45 -0500 >Subject: [PATCH] Bug 12528 - Enable staff to deny message setting access to > patrons on the OPAC > >This fix permits the staff to pull apart the access to patron message setting. > >Testing: > >I Apply the patch >II Run updatedatabase.pl > >0) Search OPACEnhancedMessagingPreferences preference; >1) Validate "OPACEnhancedMessagingPreferences show patron messaging setting on the OPAC (NOTE: EnhancedMessagingPreferences must be enabled)."; >2) Disable OPACEnhancedMessagingPreferences preference; >3) Enable EnhancedMessagingPreferences preference; >4) On the OPAC -> user's settings, validate "your messaging" is not showed. >--- > .../data/mysql/atomicupdate/sysprefs_Bug12528.sql | 3 +++ > installer/data/mysql/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/patrons.pref | 7 +++++++ > .../opac-tmpl/bootstrap/en/includes/usermenu.inc | 14 ++++++++------ > .../bootstrap/en/modules/opac-messaging.tt | 7 ++++++- > opac/opac-messaging.pl | 1 + > 6 files changed, 26 insertions(+), 7 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql > >diff --git a/installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql b/installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql >new file mode 100644 >index 0000000..be3169a >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql >@@ -0,0 +1,3 @@ >+INSERT INTO systempreferences ( variable, value, options, explanation,type ) VALUES >+('OPACEnhancedMessagingPreferences', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo') >+; >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 5d4910e..ecc4ad9 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -267,6 +267,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'), > ('OPACdidyoumean',NULL,NULL,'Did you mean? configuration for the OPAC. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'), > ('OPACDisplay856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding OPACXSLT option must be on','Choice'), >+('OPACEnhancedMessagingPreferences', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo'), > ('OpacExportOptions','bibtex,dc,marcxml,marc8,utf8,marcstd,mods,ris,isbd','','Define export options available on OPAC detail page.','multiple'), > ('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes'), > ('OpacFavicon','','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','free'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index a0e8587..a3237cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -147,6 +147,13 @@ Patrons: > yes: Allow > no: "Don't allow" > - librarians to discharge borrowers and borrowers to request a discharge. >+ - >+ - pref: OPACEnhancedMessagingPreferences >+ choices: >+ yes: Show >+ no: "Don't show" >+ - "patron messaging setting on the OPAC (NOTE: EnhancedMessagingPreferences must be enabled)." >+ > "Norwegian patron database": > - > - pref: NorwegianPatronDBEnable >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >index c5a2298..f175fe3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >@@ -77,12 +77,14 @@ > [% END %] > > [% IF ( EnhancedMessagingPreferences ) %] >- [% IF ( messagingview ) %] >- <li class="active"> >- [% ELSE %] >- <li> >- [% END %] >- <a href="/cgi-bin/koha/opac-messaging.pl">your messaging</a></li> >+ [% IF Koha.Preference( 'OPACEnhancedMessagingPreferences' ) %] >+ [% IF ( messagingview ) %] >+ <li class="active"> >+ [% ELSE %] >+ <li> >+ [% END %] >+ <a href="/cgi-bin/koha/opac-messaging.pl">your messaging</a></li> >+ [% END %] > [% END %] > > [% IF Koha.Preference( 'virtualshelves' ) == 1 %] >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 b27756f..8d49c2a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -22,6 +22,7 @@ > </div> > </div> > <div class="span10"> >+ [% IF (Authorized) %] > <div id="usermessaging"> > <h3>Your messaging settings</h3> > [% IF ( settings_updated ) %] >@@ -129,7 +130,11 @@ > </fieldset> > </form> > </div> <!-- / #usermessaging --> >- </div> <!-- / .span10 --> >+ [% ELSE %] >+ <h4>You are not allowed to call this page directly</h4> >+ <span> To report this problem, you can <a href="mailto:[% admin %]">email the Koha Administrator</a>.</span> >+ [% END %] >+ </div> <!-- / .span10 --> > </div> <!-- / .row-fluid --> > </div> <!-- / .container-fluid --> > </div> <!-- / .main --> >diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl >index dfd273a..ba6dda6 100755 >--- a/opac/opac-messaging.pl >+++ b/opac/opac-messaging.pl >@@ -64,6 +64,7 @@ $template->param( BORROWER_INFO => [ $borrower ], > messagingview => 1, > SMSnumber => $borrower->{'smsalertnumber'}, > SMSSendDriver => C4::Context->preference("SMSSendDriver"), >+ Authorized => C4::Context->preference('OPACEnhancedMessagingPreferences'), > TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification") ); > > output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12528
:
29505
|
30259
|
30348
|
30349
|
30487
|
31047
|
36511
|
36512
|
36513
|
36818
|
44302
|
44820
|
44826
|
45885
|
45886
|
45962
|
46003
|
46015
|
46082
|
46156
|
46217
|
46218
|
50649
|
50650
|
50651
|
50652
|
50988
|
50989
|
51000
|
51001
|
51002
|
51003
|
51004