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

(-)a/tools/quotes/quotes-upload_ajax.pl (-10 / +6 lines)
Lines 32-47 use C4::Output; Link Here
32
my $cgi = new CGI;
32
my $cgi = new CGI;
33
my $dbh = C4::Context->dbh;
33
my $dbh = C4::Context->dbh;
34
34
35
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
35
my ( $status, $cookie, $sessionID ) = C4::Auth::check_api_auth( $cgi, { tools => 'edit_quotes' } );
36
    {
36
unless ($status eq "ok") {
37
        template_name   => "",
37
    print $cgi->header(-type => 'application/json', -status => '403 Forbidden');
38
        query           => $cgi,
38
    print to_json({ auth_status => $status });
39
        type            => "intranet",
39
    exit 0;
40
        authnotrequired => 0,
40
}
41
        flagsrequired   => { tools => 'edit_quotes' },
42
        debug           => 1,
43
    }
44
);
45
41
46
my $success = 'true';
42
my $success = 'true';
47
43
(-)a/tools/quotes/quotes_ajax.pl (-11 / +6 lines)
Lines 31-46 my $cgi = CGI->new; Link Here
31
my $dbh = C4::Context->dbh;
31
my $dbh = C4::Context->dbh;
32
my $sort_columns = ["id", "source", "text", "timestamp"];
32
my $sort_columns = ["id", "source", "text", "timestamp"];
33
33
34
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
34
my ( $status, $cookie, $sessionID ) = C4::Auth::check_api_auth( $cgi, { tools => 'edit_quotes' } );
35
    {
35
unless ($status eq "ok") {
36
        template_name   => "",
36
    print $cgi->header(-type => 'application/json', -status => '403 Forbidden');
37
        query           => $cgi,
37
    print to_json({ auth_status => $status });
38
        type            => "intranet",
38
    exit 0;
39
        authnotrequired => 0,
39
}
40
        flagsrequired   => { tools => 'edit_quotes' },
41
        debug           => 1,
42
    }
43
);
44
40
45
# NOTE: This is a collection of ajax functions for use with tools/quotes.pl
41
# NOTE: This is a collection of ajax functions for use with tools/quotes.pl
46
42
47
- 

Return to bug 14440