Bug 14298: Use the new permission in the sco scripts

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Note without this patch, you won't be able to access the SCO side.
So don't panic if you cant use SCO with just the first patch

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2015-09-02 16:10:45 +01:00 committed by Tomas Cohen Arazi
parent 0893a7c3db
commit 995e27b373
3 changed files with 4 additions and 3 deletions

View File

@ -35,7 +35,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({
type => "opac",
debug => 1,
authnotrequired => 1,
flagsrequired => {circulate => "circulate_remaining_permissions"},
flagsrequired => {circulate => "self_checkout"},
});
if (C4::Context->preference('SelfCheckoutByLogin')) {

View File

@ -65,11 +65,12 @@ if (C4::Context->preference('AutoSelfCheckAllowed'))
my ($template, $loggedinuser, $cookie) = get_template_and_user({
template_name => "sco/sco-main.tt",
authnotrequired => 0,
flagsrequired => { circulate => "circulate_remaining_permissions" },
flagsrequired => { circulate => "self_checkout" },
query => $query,
type => "opac",
debug => 1,
});
if (C4::Context->preference('SelfCheckoutByLogin'))
{
$template->param(authbylogin => 1);

View File

@ -22,7 +22,7 @@ use warnings;
use C4::Service;
use C4::Members;
my ($query, $response) = C4::Service->init(circulate => 'circulate_remaining_permissions');
my ($query, $response) = C4::Service->init(circulate => 'self_checkout');
unless (C4::Context->preference('WebBasedSelfCheck')) {
print $query->header(status => '403 Forbidden - web-based self-check not enabled');