Bug 1442 - AutoLocation does not actually work as advertised
Summary: AutoLocation does not actually work as advertised
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: importedbugs (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) critical (vote)
Assignee: Chris Cormack
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-29 07:56 UTC by Chris Cormack
Modified: 2024-04-22 11:43 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 00:30:30 UTC


---- Reported by jmf@liblime.com 2007-09-29 19:56:59 ----

With AutoLocation set to Yes, two branches defined, both with IP addresses set, one of them is my IP address. On my workstation, a staff user can log into either branch with no restrictions.



---- Additional Comments From paul.poulain@biblibre.com 2007-10-02 13:24:47 ----

I would definetly not set this as a blocker, just hide the systempref for instance if you prefer.

http://i17.bureau.paulpoulain.com/cgi-bin/koha/mainpage.pl, I log as test / test, select "main branch".
AutoLocation is ON, the lib2 branch has my IP address, and ... i'm logged at lib2, so no bug here.

The user can change, in Circulation, the user can change the branch. Is it where you think it's a bug ? Anyway, I think this menu should be hidden when AutoLocation is ON, so I hide it ;-) fix submitted



---- Additional Comments From jmf@liblime.com 2007-10-03 05:29:31 ----

OK, tested this and it works ... if you assign an IP address to a branch library
and you log in from that IP, it auto-locates you at that branch. It also works for subnets, such as 192.168.1.*



---- Additional Comments From jmf@liblime.com 2007-10-05 17:24:46 ----

OK, just tested three patches by Paul:

http://git.koha.org/cgi-bin/gitweb.cgi?p=Koha;a=commit;h=ebb9890ccb88727117c47dd3db56c2ad6591228b
http://git.koha.org/cgi-bin/gitweb.cgi?p=Koha;a=commit;h=ba569c3cfa6f8e9c383b47b0f204e2a6d810b533
http://git.koha.org/cgi-bin/gitweb.cgi?p=Koha;a=commit;h=d24f28a4131f4e4b39bee7e8a9b7a16896be29e4

These do improve things slightly, but are buggy. If you have AutoLocation AND IndependentBranches defined, and you set a branch to have an IP, Koha will hide the link to 'setbranchprinter.pl' (Set). But, if you have AutoLocation turned OFF, the link will appear, but it won't work, and Koha will still AutoLocate you. If you have it turned off, it shoudln't use the IP addresses to set the branch. I'm re-opening this bug.



---- Additional Comments From oleonard@myacpl.org 2007-11-20 09:09:05 ----

I'm modifying the templates so that they check for both IndependantBranches and AutoLocation, and hide branch-selection interface elements if either one is turned on. Hopefully this will address the template problems that Joshua describes.

AutoLocation is working for me, but IndependantBranches doesn't seem to be logging me in according to the homebranch value in my patron record.

What happens if AutoLocation and IndependantBranches are both turned on, but the branch in my patron record differs from the branch whose IP I'm connecting from? Shouldn't I be blocked from accessing Koha completely?



---- Additional Comments From jmf@liblime.com 2007-11-24 20:03:21 ----

Yes, if AutoLocation and IndependantBranches are both on, and your account is at the wrong IP range for your branch, you shouldn't be able to log in. I'm running a few tests here, should have some feedback shortly w/respect to where we're at with this bug.



---- Additional Comments From jmf@liblime.com 2007-11-24 20:32:35 ----

AutoLocation ON
IndependantBranches ON
user kados normal circ user with branch MAIN
branch MAIN has my IP range set

* OK   user can't change his own or anyone else's branch
* OK   user doesn't have 'Set' option and isn't prompted to pick a branch at login
* OK   user's branch is set to the IP logging in from
* OK   user's session branch is set to the user's branch
* FAIL patron can still log in to the branch if at the wrong IP

AutoLocation OFF
IndependantBranches ON
patron kados normal circ user with branch MAIN
branch MAIN has my IP range set

* OK   user correctly can't change his own or anyone else's branch
* OK   user doesn't have 'Set' option and isn't prompted to pick a branch at login
* OK   user's session branch is set to the user's branch

So Owen, double-check again that IndependantBranches is logging you into the right branch, it's working for me.

It looks like there's just one thing remaining: if both AutoLocate AND IndependantBranches are turned on, and the user attempts to log in from the wrong IP, the user should be blocked.



---- Additional Comments From jmf@liblime.com 2008-01-04 19:32:03 ----

This bug should be fixed before the 3.0 beta.



---- Additional Comments From chris@bigballofwax.co.nz 2008-01-06 13:35:31 ----

"It looks like there's just one thing remaining: if both AutoLocate AND
IndependantBranches are turned on, and the user attempts to log in from the
wrong IP, the user should be blocked."

Working on a fix for this now



---- Additional Comments From chris@bigballofwax.co.nz 2008-01-06 15:34:35 ----

Patch sent



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 00:30 UTC  ---

This bug was previously known as _bug_ 1442 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=1442

Unknown Component Authentication
   Using default product and component set in Parameters 
Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was jmf@liblime.com.