|
Lines 19-28
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
use CGI qw ( -utf8 ); |
21 |
use CGI qw ( -utf8 ); |
|
|
22 |
use C4::Auth qw( check_cookie_auth ); |
| 22 |
|
23 |
|
| 23 |
use Koha::FrameworkPlugin; |
24 |
use Koha::FrameworkPlugin; |
| 24 |
|
25 |
|
| 25 |
my $input = CGI->new; |
26 |
my $input = CGI->new; |
|
|
27 |
my ($auth_status) = |
| 28 |
check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => 1 } ); |
| 29 |
if ( $auth_status ne "ok" ) { |
| 30 |
print $input->header( -type => 'text/plain', -status => '403 Forbidden' ); |
| 31 |
exit 0; |
| 32 |
} |
| 33 |
|
| 26 |
my $plugin= Koha::FrameworkPlugin->new( { |
34 |
my $plugin= Koha::FrameworkPlugin->new( { |
| 27 |
name => scalar $input->param("plugin_name"), |
35 |
name => scalar $input->param("plugin_name"), |
| 28 |
}); |
36 |
}); |