Bug 38731 - OPAC should not prevent AutoSelfCheckID's user from connecting if AutoSelfCheckAllowed is not active
Summary: OPAC should not prevent AutoSelfCheckID's user from connecting if AutoSelfCh...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Self checkout (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-17 14:19 UTC by Baptiste Wojtkowski (bwoj)
Modified: 2024-12-17 14:19 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Baptiste Wojtkowski (bwoj) 2024-12-17 14:19:09 UTC
I'm not totally sure this should be done since in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26435 it appears to be known, but I don't think that user filled in AutoSelfCheckID should be considered as "The sco user" as long as AutoSelfCheckAllowed.

There might be other places, but for example, if the username in AutoSelfCheckID fits an account while AutoSelfCheckAllowed is not active, the user will be prevented from login since AutoSelfCheckAllowed is not checked in C4/Auth.pm.

cf: 
 229         my $is_sco_user;
 230         if ($session){
 231             $is_sco_user = $session->param('sco_user');
 232         }
 233         my $kick_out;
 234 
 235         if (
 236 # If the user logged in is the SCO user and they try to go out of the SCO module,
 237 # log the user out removing the CGISESSID cookie
 238             $in->{template_name} !~ m|sco/| && $in->{template_name} !~ m|errors/errorpage.tt|
 239             && (
 240                 $is_sco_user ||
 241                 (
 242                     C4::Context->preference('AutoSelfCheckID')
 243                     && $user eq C4::Context->preference('AutoSelfCheckID')
 244                 )
 245             )
 246           )
 247         {
 248             $kick_out = 1;
 249         }