View | Details | Raw Unified | Return to bug 13663
Collapse All | Expand All

(-)a/tools/upload-file-progress.pl (-7 / +7 lines)
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) {
(-)a/tools/upload-file.pl (-9 / +8 lines)
Lines 39-57 use C4::UploadedFile; Link Here
39
# have been created.
39
# have been created.
40
40
41
my $flags_required = [
41
my $flags_required = [
42
		{circulate => 'circulate_remaining_permissions'},
42
    {circulate  => 'circulate_remaining_permissions'},
43
		{tools => 'stage_marc_import'},
43
    {tools      => 'stage_marc_import'},
44
		{tools => 'upload_local_cover_images'}
44
    {tools      => 'upload_local_cover_images'}
45
];
45
];
46
46
47
my %cookies = fetch CGI::Cookie;
47
my %cookies = fetch CGI::Cookie;
48
48
49
my $auth_failure = 1;
49
my $auth_failure = 1;
50
my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value);
50
my ( $auth_status, $sessionID ) = check_cookie_auth( $cookies{'CGISESSID'}->value );
51
foreach my $flag_required (@{ $flags_required}) {
51
foreach my $flag_required ( @{$flags_required} ) {
52
		if (my $flags = haspermission(C4::Context->config('user'), $flag_required)) {
52
    if ( my $flags = haspermission( C4::Context->config('user'), $flag_required ) ) {
53
				$auth_failure = 0 if $auth_status eq 'ok';
53
        $auth_failure = 0 if $auth_status eq 'ok';
54
		}
54
    }
55
}
55
}
56
56
57
if ($auth_failure) {
57
if ($auth_failure) {
58
- 

Return to bug 13663