Lines 31-39
use CGI::Cookie; # need to check cookies before
Link Here
|
31 |
# having CGI parse the POST request |
31 |
# having CGI parse the POST request |
32 |
|
32 |
|
33 |
my $flags_required = [ |
33 |
my $flags_required = [ |
34 |
{circulate => 'circulate_remaining_permissions'}, |
34 |
{circulate => 'circulate_remaining_permissions'}, |
35 |
{tools => 'stage_marc_import'}, |
35 |
{tools => 'stage_marc_import'}, |
36 |
{tools => 'upload_local_cover_images'} |
36 |
{tools => 'upload_local_cover_images'}, |
37 |
]; |
37 |
]; |
38 |
|
38 |
|
39 |
my %cookies = fetch CGI::Cookie; |
39 |
my %cookies = fetch CGI::Cookie; |
Lines 41-50
my %cookies = fetch CGI::Cookie;
Link Here
|
41 |
my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value); |
41 |
my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value); |
42 |
|
42 |
|
43 |
my $auth_failure = 1; |
43 |
my $auth_failure = 1; |
44 |
foreach my $flag_required (@{ $flags_required}) { |
44 |
foreach my $flag_required ( @{$flags_required} ) { |
45 |
if (my $flags = haspermission(C4::Context->config('user'), $flag_required)) { |
45 |
if ( my $flags = haspermission( C4::Context->config('user'), $flag_required ) ) { |
46 |
$auth_failure = 0 if $auth_status eq 'ok'; |
46 |
$auth_failure = 0 if $auth_status eq 'ok'; |
47 |
} |
47 |
} |
48 |
} |
48 |
} |
49 |
|
49 |
|
50 |
if ($auth_failure) { |
50 |
if ($auth_failure) { |