Bug 12069 - If you access members/mod_debarment.pl when logged out you are redirected to OPAC login
Summary: If you access members/mod_debarment.pl when logged out you are redirected to ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL: /members/mod_debarment.pl?borrowernum...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-10 19:49 UTC by Owen Leonard
Modified: 2015-06-04 23:30 UTC (History)
4 users (show)

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


Attachments
Bug 12069 - If you access members/mod_debarment.pl when logged out you are redirected to OPAC login (1.44 KB, patch)
2014-04-11 13:48 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED OFF] Bug 12069 - If you access members/mod_debarment.pl when logged out you are redirected to OPAC login (1.47 KB, patch)
2014-04-11 14:42 UTC, Mark Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 12069 - If you access members/mod_debarment.pl when logged out you are redirected to OPAC login (1.58 KB, patch)
2014-04-12 15:49 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2014-04-10 19:49:23 UTC
I had a patron account open, viewing some existing restrictions on the patrons account. My session had timed out, and when I clicked the link to remove a restriction I was redirected to an OPAC login page instead of the staff client one.
Comment 1 Mark Tompsett 2014-04-10 23:03:03 UTC
I confirmed this in master. This was introduced in bug 2720. I don't think it existed in 3.12, since the file doesn't exist in origin/3.12.x.

Any patch should also work in 3.14.x, since mod_debarment.pl has not been modified since then.

Looks like members/mod_debarment.pl does not pass 'intranet' as the 4th parameter to the checkauth call. Are you doing a patch for this, Owen?
Comment 2 Owen Leonard 2014-04-11 13:00:42 UTC
(In reply to M. Tompsett from comment #1)
> Are you doing a patch for this, Owen?

The fact that the bug is assigned to me and the status is "ASSIGNED" signals my intention to do a patch.
Comment 3 Owen Leonard 2014-04-11 13:48:29 UTC Comment hidden (obsolete)
Comment 4 Mark Tompsett 2014-04-11 14:42:06 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2014-04-11 14:45:23 UTC
This also applies cleanly to 3.14.x
Comment 6 Katrin Fischer 2014-04-12 15:49:23 UTC
Created attachment 27052 [details] [review]
[PASSED QA] Bug 12069 - If you access members/mod_debarment.pl when logged out you are redirected to OPAC login

members/mod_debarment.pl's call to checkauth should pass 'intranet' so
that if the user happens to be logged out they will be redirected to the
staff client login form.

To test, apply the patch and log in to the staff client:

- Add a restriction to a patron's account.
- View the restrictions tab on the patron's account. You should see the
  restriction and a "Remove" link for that restriction.
- In another tab, log out of the staff client.
- In the first tab, click the "Remove" link. You should be redirected to
  the staff client login page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good catch! Works as described, passes all tests and QA script.
Comment 7 Galen Charlton 2014-04-12 18:01:19 UTC
Pushed to master.  Thanks, Owen!
Comment 8 Fridolin Somers 2014-08-06 09:02:31 UTC
Pushed to 3.14.x, will be in 3.14.10