Bugzilla – Attachment 5214 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]
Proposed Patch
0001-Bug-6804-if-IndependantBranches-AutoLocation-OPAC-lo.patch (text/plain), 1.83 KB, created by
Ian Walls
on 2011-08-29 16:06:56 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Ian Walls
Created:
2011-08-29 16:06:56 UTC
Size:
1.83 KB
patch
obsolete
>From 234a973574cbf8df945b9eb89966bee433c18dda 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] 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 >--- > C4/Auth.pm | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 16e908a..00700b8 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -807,7 +807,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.4.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 6804
:
5214
|
6198