Bugzilla – Attachment 44243 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]
[PASSED QA] Bug 10799: Limit the SCO user to the SCO module
PASSED-QA-Bug-10799-Limit-the-SCO-user-to-the-SCO-.patch (text/plain), 1.99 KB, created by
Kyle M Hall (khall)
on 2015-10-30 17:57:02 UTC
(
hide
)
Description:
[PASSED QA] Bug 10799: Limit the SCO user to the SCO module
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-10-30 17:57:02 UTC
Size:
1.99 KB
patch
obsolete
>From 4867e33c5460620bb6fa26f713514551dfd31368 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] [PASSED QA] Bug 10799: Limit the SCO user to the SCO module >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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: Marc Véron <veron@veron.ch> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Auth.pm | 23 +++++++++++++++++++++++ > 1 files changed, 23 insertions(+), 0 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index d18ad29..b8ee9a5 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -178,6 +178,29 @@ sub get_template_and_user { > ); > } > >+ >+ # If the user logged in is the SCO user and he tries to go out the SCO module, log the user out removing the CGISESSID cookie >+ if ( $in->{type} eq 'opac' and $in->{template_name} !~ m|sco/| ) { >+ if ( C4::Context->preference('AutoSelfCheckID') && $user eq C4::Context->preference('AutoSelfCheckID') ) { >+ $template = C4::Templates::gettemplate( 'opac-auth.tt', 'opac', $in->{query} ); >+ my $cookie = $in->{query}->cookie( >+ -name => 'CGISESSID', >+ -value => '', >+ -expires => '', >+ -HttpOnly => 1, >+ ); >+ >+ $template->param( loginprompt => 1 ); >+ print $in->{query}->header( >+ -type => 'text/html', >+ -charset => 'utf-8', >+ -cookie => $cookie, >+ ), >+ $template->output; >+ safe_exit; >+ } >+ } >+ > my $borrowernumber; > if ($user) { > require C4::Members; >-- >1.7.2.5
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