Lines 38-43
use Koha::Checkouts;
Link Here
|
38 |
use Koha::DateUtils qw(dt_from_string); |
38 |
use Koha::DateUtils qw(dt_from_string); |
39 |
use Koha::Library::Groups; |
39 |
use Koha::Library::Groups; |
40 |
use Koha::Libraries; |
40 |
use Koha::Libraries; |
|
|
41 |
use Koha::Cash::Registers; |
41 |
use Koha::Desks; |
42 |
use Koha::Desks; |
42 |
use Koha::Patrons; |
43 |
use Koha::Patrons; |
43 |
use Koha::Patron::Consents; |
44 |
use Koha::Patron::Consents; |
Lines 847-853
sub checkauth {
Link Here
|
847 |
$session->param('branchname'), $session->param('flags'), |
848 |
$session->param('branchname'), $session->param('flags'), |
848 |
$session->param('emailaddress'), $session->param('shibboleth'), |
849 |
$session->param('emailaddress'), $session->param('shibboleth'), |
849 |
$session->param('desk_id'), $session->param('desk_name'), |
850 |
$session->param('desk_id'), $session->param('desk_name'), |
850 |
$session->param('register_id') |
851 |
$session->param('register_id'), $session->param('register_name') |
851 |
); |
852 |
); |
852 |
C4::Context::set_shelves_userenv( 'bar', $session->param('barshelves') ); |
853 |
C4::Context::set_shelves_userenv( 'bar', $session->param('barshelves') ); |
853 |
C4::Context::set_shelves_userenv( 'pub', $session->param('pubshelves') ); |
854 |
C4::Context::set_shelves_userenv( 'pub', $session->param('pubshelves') ); |
Lines 1068-1074
sub checkauth {
Link Here
|
1068 |
} |
1069 |
} |
1069 |
my ( $borrowernumber, $firstname, $surname, $userflags, |
1070 |
my ( $borrowernumber, $firstname, $surname, $userflags, |
1070 |
$branchcode, $branchname, $emailaddress, $desk_id, |
1071 |
$branchcode, $branchname, $emailaddress, $desk_id, |
1071 |
$desk_name, $register_id ); |
1072 |
$desk_name, $register_id, $register_name ); |
1072 |
|
1073 |
|
1073 |
if ( $return == 1 ) { |
1074 |
if ( $return == 1 ) { |
1074 |
my $select = " |
1075 |
my $select = " |
Lines 1119-1124
sub checkauth {
Link Here
|
1119 |
} |
1120 |
} |
1120 |
if ( $query->param('register_id') ) { |
1121 |
if ( $query->param('register_id') ) { |
1121 |
$register_id = $query->param('register_id'); |
1122 |
$register_id = $query->param('register_id'); |
|
|
1123 |
my $register = Koha::Cash::Registers->find($register_id); |
1124 |
$register_name = $register ? $register->name : ''; |
1122 |
} |
1125 |
} |
1123 |
my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search }; |
1126 |
my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search }; |
1124 |
if ( $type ne 'opac' and C4::Context->boolean_preference('AutoLocation') ) { |
1127 |
if ( $type ne 'opac' and C4::Context->boolean_preference('AutoLocation') ) { |
Lines 1164-1169
sub checkauth {
Link Here
|
1164 |
$session->param( 'interface', $type); |
1167 |
$session->param( 'interface', $type); |
1165 |
$session->param( 'shibboleth', $shibSuccess ); |
1168 |
$session->param( 'shibboleth', $shibSuccess ); |
1166 |
$session->param( 'register_id', $register_id ); |
1169 |
$session->param( 'register_id', $register_id ); |
|
|
1170 |
$session->param( 'register_name', $register_name ); |
1167 |
$debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map { $session->param($_) } qw(cardnumber firstname surname branch); |
1171 |
$debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map { $session->param($_) } qw(cardnumber firstname surname branch); |
1168 |
} |
1172 |
} |
1169 |
$session->param('cas_ticket', $cas_ticket) if $cas_ticket; |
1173 |
$session->param('cas_ticket', $cas_ticket) if $cas_ticket; |
Lines 1174-1180
sub checkauth {
Link Here
|
1174 |
$session->param('branchname'), $session->param('flags'), |
1178 |
$session->param('branchname'), $session->param('flags'), |
1175 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1179 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1176 |
$session->param('desk_id'), $session->param('desk_name'), |
1180 |
$session->param('desk_id'), $session->param('desk_name'), |
1177 |
$session->param('register_id') |
1181 |
$session->param('register_id'), $session->param('register_name') |
1178 |
); |
1182 |
); |
1179 |
|
1183 |
|
1180 |
} |
1184 |
} |
Lines 1453-1459
sub check_api_auth {
Link Here
|
1453 |
$session->param('branchname'), $session->param('flags'), |
1457 |
$session->param('branchname'), $session->param('flags'), |
1454 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1458 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1455 |
$session->param('desk_id'), $session->param('desk_name'), |
1459 |
$session->param('desk_id'), $session->param('desk_name'), |
1456 |
$session->param('register_id') |
1460 |
$session->param('register_id'), $session->param('register_name') |
1457 |
); |
1461 |
); |
1458 |
|
1462 |
|
1459 |
my $ip = $session->param('ip'); |
1463 |
my $ip = $session->param('ip'); |
Lines 1615-1621
sub check_api_auth {
Link Here
|
1615 |
$session->param('branchname'), $session->param('flags'), |
1619 |
$session->param('branchname'), $session->param('flags'), |
1616 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1620 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1617 |
$session->param('desk_id'), $session->param('desk_name'), |
1621 |
$session->param('desk_id'), $session->param('desk_name'), |
1618 |
$session->param('register_id') |
1622 |
$session->param('register_id'), $session->param('register_name') |
1619 |
); |
1623 |
); |
1620 |
return ( "ok", $cookie, $sessionID ); |
1624 |
return ( "ok", $cookie, $sessionID ); |
1621 |
} else { |
1625 |
} else { |
Lines 1705-1711
sub check_cookie_auth {
Link Here
|
1705 |
$session->param('branchname'), $session->param('flags'), |
1709 |
$session->param('branchname'), $session->param('flags'), |
1706 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1710 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1707 |
$session->param('desk_id'), $session->param('desk_name'), |
1711 |
$session->param('desk_id'), $session->param('desk_name'), |
1708 |
$session->param('register_id') |
1712 |
$session->param('register_id'), $session->param('register_name') |
1709 |
); |
1713 |
); |
1710 |
|
1714 |
|
1711 |
my $ip = $session->param('ip'); |
1715 |
my $ip = $session->param('ip'); |