Bugzilla – Attachment 42247 Details for
Bug 10799
Able to become self-checkout staff user in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10799: Limit the SCO user to the SCO module
Bug-10799-Limit-the-SCO-user-to-the-SCO-module.patch (text/plain), 1.34 KB, created by
Chris Cormack
on 2015-09-02 21:55:07 UTC
(
hide
)
Description:
Bug 10799: Limit the SCO user to the SCO module
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2015-09-02 21:55:07 UTC
Size:
1.34 KB
patch
obsolete
>From 630c1904aaddeb1d2d46244b5a3681e1e13005c6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 2 Sep 2015 17:13:41 +0100 >Subject: [PATCH] Bug 10799: Limit the SCO user to the SCO module > >The SCO user should only be allowed to access to the SCO module. > >This patch make the session ends if the user tries to access another >page after the SCO module. > >Test plan: >0/ Configure the SCO module correctly >1/ Go on the sco main page (sco/sco-main.pl) >2/ Try to go somewhere else: you should not be logged in > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >Works as advertised, the SelfCheck still works fine >I made the tiny change Mark asked for to keep the logs quiet >--- > C4/Auth.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index ef0c585..a3d9db6 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -178,6 +178,13 @@ sub get_template_and_user { > ); > } > >+ # If the user logged in is the SCO user and he tries to go out the SCO module, the log user out. >+ if ( $in->{type} eq 'opac' and $in->{template_name} !~ m|sco/| ) { >+ if ( C4::Context->preference('AutoSelfCheckID') && $user eq C4::Context->preference('AutoSelfCheckID') ) { >+ $user = undef; >+ } >+ } >+ > my $borrowernumber; > if ($user) { > require C4::Members; >-- >2.5.0
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 10799
:
42232
|
42233
|
42247
|
42248
|
42516
|
44043
|
44243