Bugzilla – Attachment 76098 Details for
Bug 20954
Add ability to set syspref overrides in SIP as we can in Apache
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20954: Add ability to set syspref overrides in SIP as we can in apache
Bug-20954-Add-ability-to-set-syspref-overrides-in-.patch (text/plain), 3.00 KB, created by
Kyle M Hall (khall)
on 2018-06-15 13:12:46 UTC
(
hide
)
Description:
Bug 20954: Add ability to set syspref overrides in SIP as we can in apache
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-06-15 13:12:46 UTC
Size:
3.00 KB
patch
obsolete
>From b15e3983166f2df0415f5e01b8d6ff59cf7012a9 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 15 Jun 2018 13:03:43 +0000 >Subject: [PATCH] Bug 20954: Add ability to set syspref overrides in SIP as we > can in apache > >We should be able to set system preference overrides for SIP in a >similar manner that we do in Apache. It would be great if we could >specify those overrides on both a config level, and login level basis. > >Test Plan: > 1) Apply this patch > 2) Start your SIP server > 3) Enable the syspref AllFinesNeedOverride > 4) Find or create a patron with a small fine ( less than noissuescharge ) > 5) Attempt to check out an item to the patron, it should fail > 6) Add the global syspref override from the bottom of the example SIP config file > 7) Restart your SIP server > 8) Attempt to check out an item to the patron again, this time it should work > 9) Now, add the login level syspref override section as it appears in > the eaxmple SIP config file. Make sure to add it to the login you are using >10) Attempt to check out another item to the patron, this time is should > again fail >--- > C4/SIP/Sip/MsgType.pm | 9 +++++++++ > etc/SIPconfig.xml | 12 ++++++++++++ > 2 files changed, 21 insertions(+) > >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 9ec126ed12..56139d0145 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -331,6 +331,15 @@ sub handle { > my $config = $server->{config}; > my $self; > >+ # Set system preference overrides, first global, then account level >+ foreach my $key ( keys %{ $config->{'syspref-overrides'} } ) { >+ $ENV{"OVERRIDE_SYSPREF_$key"} = $config->{'syspref-overrides'}->{$key}; >+ } >+ foreach my $key ( keys %{ $server->{account}->{'syspref-overrides'} } ) { >+ $ENV{"OVERRIDE_SYSPREF_$key"} = >+ $server->{account}->{'syspref-overrides'}->{$key}; >+ } >+ > # > # What's the field delimiter for variable length fields? > # This can't be based on the account, since we need to know >diff --git a/etc/SIPconfig.xml b/etc/SIPconfig.xml >index 5d9ee98bc2..fdf098818f 100644 >--- a/etc/SIPconfig.xml >+++ b/etc/SIPconfig.xml >@@ -57,6 +57,9 @@ > <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" /> > <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" /> > <patron_attribute field="XY" code="CODE" /> >+ <syspref-overrides> >+ <AllFinesNeedOverride>0</AllFinesNeedOverride> >+ </syspref-overrides> > </login> > </accounts> > >@@ -97,4 +100,13 @@ in our case "ILS". > retries="5" /> > </institution> > </institutions> >+ >+<!-- This section allows system preferences to be overridden on a global basis. >+ If the same system preference is overridden at the login level, the login >+ version will take precedence. >+--> >+<syspref-overrides> >+ <AllFinesNeedOverride>0</AllFinesNeedOverride> >+</syspref-overrides> >+ > </acsconfig> >-- >2.15.2 (Apple Git-101.1)
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 20954
:
76098
|
76103
|
86832
|
86971
|
92101
|
92102