Bugzilla – Attachment 145991 Details for
Bug 20632
Staff users without superlibrarian can't log into OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20632: Alert when SCO or SCI user in OPAC login page
Bug-20632-Alert-when-SCO-or-SCI-user-in-OPAC-login.patch (text/plain), 3.21 KB, created by
Fridolin Somers
on 2023-02-02 07:34:11 UTC
(
hide
)
Description:
Bug 20632: Alert when SCO or SCI user in OPAC login page
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2023-02-02 07:34:11 UTC
Size:
3.21 KB
patch
obsolete
>From 2e67673b373c72dce75312d05810e52be1a5350c Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 1 Feb 2023 21:23:43 -1000 >Subject: [PATCH] Bug 20632: Alert when SCO or SCI user in OPAC login page > >Special patrons for self check-out/check-in are not allowed to login >into OPAC. > >This patch adds an alter message in OPAC login page when >authentification is tried with SCO/SCI user. > >Test plan : >1) SCO >1.1) Use koha-testing-docker that is configured with patron 'self_checkout' >1.2) Go to OPAC main page, not logged-in >1.3) Try to login with login 'self_checkout' and password 'self_checkout' >=> You see an alert 'You can not loggin with self check-out user' >2) SCI >2.1) Create a new patron with login 'self_checkin', password 'self_checkin' >2.2) Define on him the permission 'self_checkin_module' >2.3) Go to OPAC main page, not logged-in >2.4) Try to login with login 'self_checkin' and password 'self_checkin' >=> You see an alert 'You can not loggin with self check-in user' >--- > C4/Auth.pm | 5 +++-- > .../opac-tmpl/bootstrap/en/modules/opac-auth.tt | 12 ++++++++++++ > 2 files changed, 15 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 8e5b5f6e54..908f725029 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -229,7 +229,7 @@ sub get_template_and_user { > ) > ) > { >- $kick_out = 1; >+ $kick_out = 'sco_user'; > } > elsif ( > # If the user logged in is the SCI user and they try to go out of the SCI module, >@@ -245,7 +245,7 @@ sub get_template_and_user { > && $flags && $flags->{superlibrarian} != 1 > ) > { >- $kick_out = 1; >+ $kick_out = 'sci_user'; > } > > if ($kick_out) { >@@ -265,6 +265,7 @@ sub get_template_and_user { > loginprompt => 1, > script_name => get_script_name(), > auth_error => $auth_error, >+ $kick_out => 1, > ); > > print $in->{query}->header( >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >index 999e6aaa7e..ff46083fe3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt >@@ -84,6 +84,18 @@ > </div> > [% END %] > >+ [% IF sco_user %] >+ <div class="alert alert-info"> >+ <p>You can not loggin with self check-out user</p> >+ </div> >+ [% END %] >+ >+ [% IF sci_user %] >+ <div class="alert alert-info"> >+ <p>You can not loggin with self check-in user</p> >+ </div> >+ [% END %] >+ > [% IF ( shibbolethAuthentication ) %] > [% IF ( invalidShibLogin ) %] > <!-- This is what is displayed if shibboleth login has failed to match a koha user --> >-- >2.39.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 20632
: 145991