[Koha-bugs] [Bug 31042] New: OVERRIDE_SYSPREF does not work for REST API

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 24 16:09:53 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31042

            Bug ID: 31042
           Summary: OVERRIDE_SYSPREF does not work for REST API
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: REST API
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: jonathan.druart+koha at gmail.com
                CC: tomascohen at gmail.com

We are supposed to be able to override syspref's values using the
OVERRIDE_SYSPREF trick, but it's not working for the REST API.

To recreate, open /etc/koha/apache-shared-intranet-plack.conf and add
  RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_Foo Bar"

Add some warn, mainpage.pl and Koha/REST/V1/Patrons.pm (sub list) for instance
warn C4::Context->preference('Foo');

Hit the mainpage, look at the log, you see "Bar". Search for patrons: "Use of
uninitialized value in warn"
=> The syspref hasn't been overridden.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list