|
Lines 145-152
sub get_template_and_user {
Link Here
|
| 145 |
} |
145 |
} |
| 146 |
|
146 |
|
| 147 |
my $borrowernumber; |
147 |
my $borrowernumber; |
| 148 |
my $insecure = C4::Context->preference('insecure'); |
148 |
if ($user) { |
| 149 |
if ($user or $insecure) { |
|
|
| 150 |
require C4::Members; |
149 |
require C4::Members; |
| 151 |
# It's possible for $user to be the borrowernumber if they don't have a |
150 |
# It's possible for $user to be the borrowernumber if they don't have a |
| 152 |
# userid defined (and are logging in through some other method, such |
151 |
# userid defined (and are logging in through some other method, such |
|
Lines 186-192
sub get_template_and_user {
Link Here
|
| 186 |
# We are going to use the $flags returned by checkauth |
185 |
# We are going to use the $flags returned by checkauth |
| 187 |
# to create the template's parameters that will indicate |
186 |
# to create the template's parameters that will indicate |
| 188 |
# which menus the user can access. |
187 |
# which menus the user can access. |
| 189 |
if (( $flags && $flags->{superlibrarian}==1) or $insecure==1) { |
188 |
if ( $flags && $flags->{superlibrarian}==1 ) { |
| 190 |
$template->param( CAN_user_circulate => 1 ); |
189 |
$template->param( CAN_user_circulate => 1 ); |
| 191 |
$template->param( CAN_user_catalogue => 1 ); |
190 |
$template->param( CAN_user_catalogue => 1 ); |
| 192 |
$template->param( CAN_user_parameters => 1 ); |
191 |
$template->param( CAN_user_parameters => 1 ); |
|
Lines 195-201
sub get_template_and_user {
Link Here
|
| 195 |
$template->param( CAN_user_reserveforothers => 1 ); |
194 |
$template->param( CAN_user_reserveforothers => 1 ); |
| 196 |
$template->param( CAN_user_borrow => 1 ); |
195 |
$template->param( CAN_user_borrow => 1 ); |
| 197 |
$template->param( CAN_user_editcatalogue => 1 ); |
196 |
$template->param( CAN_user_editcatalogue => 1 ); |
| 198 |
$template->param( CAN_user_updatecharges => 1 ); |
197 |
$template->param( CAN_user_updatecharges => 1 ); |
| 199 |
$template->param( CAN_user_acquisition => 1 ); |
198 |
$template->param( CAN_user_acquisition => 1 ); |
| 200 |
$template->param( CAN_user_management => 1 ); |
199 |
$template->param( CAN_user_management => 1 ); |
| 201 |
$template->param( CAN_user_tools => 1 ); |
200 |
$template->param( CAN_user_tools => 1 ); |
|
Lines 320-326
sub get_template_and_user {
Link Here
|
| 320 |
GoogleJackets => C4::Context->preference("GoogleJackets"), |
319 |
GoogleJackets => C4::Context->preference("GoogleJackets"), |
| 321 |
OpenLibraryCovers => C4::Context->preference("OpenLibraryCovers"), |
320 |
OpenLibraryCovers => C4::Context->preference("OpenLibraryCovers"), |
| 322 |
KohaAdminEmailAddress => "" . C4::Context->preference("KohaAdminEmailAddress"), |
321 |
KohaAdminEmailAddress => "" . C4::Context->preference("KohaAdminEmailAddress"), |
| 323 |
LoginBranchcode => (C4::Context->userenv?C4::Context->userenv->{"branch"}:"insecure"), |
322 |
LoginBranchcode => (C4::Context->userenv?C4::Context->userenv->{"branch"}:undef), |
| 324 |
LoginFirstname => (C4::Context->userenv?C4::Context->userenv->{"firstname"}:"Bel"), |
323 |
LoginFirstname => (C4::Context->userenv?C4::Context->userenv->{"firstname"}:"Bel"), |
| 325 |
LoginSurname => C4::Context->userenv?C4::Context->userenv->{"surname"}:"Inconnu", |
324 |
LoginSurname => C4::Context->userenv?C4::Context->userenv->{"surname"}:"Inconnu", |
| 326 |
emailaddress => C4::Context->userenv?C4::Context->userenv->{"emailaddress"}:undef, |
325 |
emailaddress => C4::Context->userenv?C4::Context->userenv->{"emailaddress"}:undef, |
|
Lines 349-355
sub get_template_and_user {
Link Here
|
| 349 |
IntranetNav => C4::Context->preference("IntranetNav"), |
348 |
IntranetNav => C4::Context->preference("IntranetNav"), |
| 350 |
IntranetmainUserblock => C4::Context->preference("IntranetmainUserblock"), |
349 |
IntranetmainUserblock => C4::Context->preference("IntranetmainUserblock"), |
| 351 |
LibraryName => C4::Context->preference("LibraryName"), |
350 |
LibraryName => C4::Context->preference("LibraryName"), |
| 352 |
LoginBranchname => (C4::Context->userenv?C4::Context->userenv->{"branchname"}:"insecure"), |
351 |
LoginBranchname => (C4::Context->userenv?C4::Context->userenv->{"branchname"}:undef), |
| 353 |
advancedMARCEditor => C4::Context->preference("advancedMARCEditor"), |
352 |
advancedMARCEditor => C4::Context->preference("advancedMARCEditor"), |
| 354 |
canreservefromotherbranches => C4::Context->preference('canreservefromotherbranches'), |
353 |
canreservefromotherbranches => C4::Context->preference('canreservefromotherbranches'), |
| 355 |
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), |
354 |
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), |
|
Lines 957-966
sub checkauth {
Link Here
|
| 957 |
$session->param('sessiontype','anon'); |
956 |
$session->param('sessiontype','anon'); |
| 958 |
} |
957 |
} |
| 959 |
} # END unless ($userid) |
958 |
} # END unless ($userid) |
| 960 |
my $insecure = C4::Context->boolean_preference('insecure'); |
|
|
| 961 |
|
959 |
|
| 962 |
# finished authentification, now respond |
960 |
# finished authentification, now respond |
| 963 |
if ( $loggedin || $authnotrequired || ( defined($insecure) && $insecure ) ) |
961 |
if ( $loggedin || $authnotrequired ) |
| 964 |
{ |
962 |
{ |
| 965 |
# successful login |
963 |
# successful login |
| 966 |
unless ($cookie) { |
964 |
unless ($cookie) { |