Koha/C4
Jonathan Druart 6545259bbf Bug 28785: Centralize cookie auth check in check_cookie_auth
This code is duplicated in 3 different places, we must call
check_cookie_auth instead.

It makes check_cookie_auth returns a 'restricted' when
SessionRestrictionByIP is set and the IP changed.
It also returns a third parameters contained the old and new IP, to fill
the "info" hash in checkauth but apparently the oldip and newip
variables are not even used from the template. We may want to remove it
completely.

No change is expected with this patch, the different authentication
methods should still work as before.

Test plan:
Log in the staff and OPAC interfaces, logout.
Log in and call script that call the 3 different subroutines modified by
this patch. For instance you can list checkouts (that is using
check_cookie_auth) and display a patron's image (using check_api_auth).

QA with good knowledge of the C4::Auth module and the different
authentication methods is required.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-18 11:28:41 +02:00
..
AuthoritiesMarc Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Barcodes Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSortRoutine Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSplitRoutine Bug 28572: Remove C4::Debug 2021-06-22 12:04:32 +02:00
Creators Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
External Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Form Bug 28572: Remove C4::Debug 2021-06-22 12:04:32 +02:00
Heading Bug 26852: subfield $e missing in X11 definition of MARC21 headings 2021-08-11 13:27:52 +02:00
ILSDI Bug 26351: Add plugin hooks to transform item barcodes 2021-10-06 14:56:09 +02:00
Installer Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Labels Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Linker Bug 28676: Cache and retrieve match_count when searching a cached heading 2021-09-20 12:06:56 +02:00
Members Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
OAI Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Output Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Patroncards Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Reports Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Search Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Serials Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SIP Bug 28730: Add option to format AH field (due date) in SIP checkout response 2021-10-07 11:18:29 +02:00
Utils Bug 29134: (follow-up) Specify which borrowernumber 2021-10-08 16:48:22 +02:00
Accounts.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Acquisition.pm Bug 24190: (follow-up) Modify order of logging 2021-09-21 20:22:57 +02:00
Auth.pm Bug 28785: Centralize cookie auth check in check_cookie_auth 2021-10-18 11:28:41 +02:00
Auth_cas_servers.yaml.sample Bug 17065 - Rename C4/Auth_cas_servers.yaml.orig 2016-08-08 13:16:36 +00:00
Auth_with_cas.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Auth_with_ldap.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Auth_with_shibboleth.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AuthoritiesMarc.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
BackgroundJob.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Barcodes.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Biblio.pm Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
Breeding.pm Bug 17600: Add missing imports in authorities/ 2021-08-03 14:55:26 +02:00
Budgets.pm Bug 24190: (follow-up) Rename AcqLog 2021-09-21 20:22:57 +02:00
Calendar.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Charset.pm Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
Circulation.pm Bug 29062: (QA follow-up) Add comment 2021-10-07 15:49:01 +02:00
ClassSortRoutine.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSource.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSplitRoutine.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Context.pm Bug 28306: Allow to query database with minimal memory footprint 2021-08-31 10:27:52 +02:00
Contract.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CourseReserves.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Creators.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Heading.pm Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
HoldsQueue.pm Revert "Bug 28510: Remove unnecessary conditional" 2021-10-01 16:28:55 +02:00
HTML5Media.pm Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
ImportBatch.pm Bug 28758: (bug 17600 follow-up) Import subroutines from C4/AuthoritiesMarc 2021-07-26 16:29:22 +02:00
ImportExportFramework.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
InstallAuth.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Installer.pm Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
ItemCirculationAlertPreference.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Items.pm Bug 29243: Correct call when adding items from staged records 2021-10-18 11:28:41 +02:00
Koha.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Labels.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Languages.pm Bug 15067: Follow up to fix sorting 2021-08-04 14:06:43 +02:00
Letters.pm Bug 29062: Use primary key issued_id to fetch old_issues for letters 2021-10-07 15:49:01 +02:00
Linker.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Log.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
MarcModificationTemplates.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Matcher.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Members.pm Bug 24387: Rename "News" with "Additional contents" 2021-08-16 11:55:55 +02:00
Message.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Output.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Overdues.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Patroncards.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Record.pm Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
Reports.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Reserves.pm Bug 25619: Adjust POD and move date check before logging 2021-08-27 15:28:23 +02:00
Ris.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
RotatingCollections.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Scheduler.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Scrubber.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Search.pm Bug 3142: Use filter_by_for_holds where holdability is calculated 2021-10-08 16:57:29 +02:00
Serials.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Service.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ShelfBrowser.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SMS.pm Bug 27673: Replace YAML with YAML::XS 2021-02-16 14:54:50 +01:00
SocialData.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Stats.pm Bug 17600: Fix tests 2021-07-16 09:47:01 +02:00
Suggestions.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Tags.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Templates.pm Bug 28303: Fix plugins system with multiple pluginsdir settings 2021-10-05 10:58:13 +02:00
TmplToken.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
TmplTokenType.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
TTParser.pm Bug 26673: Remove #!/usr/bin/env perl from .pm modules too 2020-10-26 00:14:42 +01:00
UsageStats.pm Bug 12561: Remove HighlightOwnItemsOnOPAC and HighlightOwnItemsOnOPACWhich 2021-08-16 09:57:04 +02:00
XISBN.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
XSLT.pm Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00