Bugzilla – Attachment 6198 Details for
Bug 6804
If IndependantBranches and AutoLocation enabled, OPAC login does not redirect properly outside IP range
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6804: if IndependantBranches & AutoLocation, OPAC login redirect fails
SIGNED-OFF-Bug-6804-if-IndependantBranches--AutoLo.patch (text/plain), 1.91 KB, created by
Sophie MEYNIEUX
on 2011-11-04 13:30:21 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6804: if IndependantBranches & AutoLocation, OPAC login redirect fails
Filename:
MIME Type:
Creator:
Sophie MEYNIEUX
Created:
2011-11-04 13:30:21 UTC
Size:
1.91 KB
patch
obsolete
>From ca6e7e6b9490f466ee3b2d8c0375a9471767a31d Mon Sep 17 00:00:00 2001 >From: Ian Walls <ian.walls@bywatersolutions.com> >Date: Mon, 29 Aug 2011 11:38:51 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 6804: if IndependantBranches & > AutoLocation, OPAC login redirect fails > >AutoLocation should only apply to the staff client login, but when IndependantBranches >was activated, it applied to the OPAC login, as well. Login was not prevented, but the >patron was greeted with another login prompt, instead of the My Summary page. Very confusing. > >This patch adds a check for whether this is an OPAC login before executing the particular code >that was causing this. > >To test: >1. Enable IndependantBranches & AutoLocation (be sure your branches have IP ranges configured!) >2. Select a staff account, and note the branch >3. Attempt to login to the staff client from within the IP range for the branch: this should work >4. Attempt to login to the staff client from outside the IP range: this should be blocked >5. Attempt to login to the OPAC from within the IP range: this should work >6. Attempt to login to the OPAC from outside the IP range: this should also work > >Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com> >--- > C4/Auth.pm | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index e360e10..b5b50f4 100755 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -820,7 +820,7 @@ sub checkauth { > $branchname = GetBranchName($branchcode); > } > my $branches = GetBranches(); >- if (C4::Context->boolean_preference('IndependantBranches') && C4::Context->boolean_preference('Autolocation')){ >+ if (C4::Context->boolean_preference('IndependantBranches') && C4::Context->boolean_preference('Autolocation') && ($type ne 'opac') ){ > # we have to check they are coming from the right ip range > my $domain = $branches->{$branchcode}->{'branchip'}; > if ($ip !~ /^$domain/){ >-- >1.7.5.4
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 6804
:
5214
| 6198