Bug 20730: Move the authentication block before doing anything

No need to add more information here, it's self-explanatory...

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 43a297efc9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2018-05-08 14:27:38 -03:00 committed by Fridolin Somers
parent 163a1f4d42
commit 599c93ef10
1 changed files with 10 additions and 9 deletions

View File

@ -51,6 +51,16 @@ my $date_selected = $query->param('date_selected');
$date_selected ||= q{};
my $dbh = C4::Context->dbh;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
template_name => 'serials/routing.tt',
query => $query,
type => 'intranet',
authnotrequired => 0,
flagsrequired => { serials => 'routing' },
}
);
if($op eq 'delete'){
delroutingmember($routingid,$subscriptionid);
}
@ -84,15 +94,6 @@ foreach my $dateseq (@{$serialdates}) {
push @{$dates}, $d;
}
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => 'serials/routing.tt',
query => $query,
type => 'intranet',
authnotrequired => 0,
flagsrequired => {serials => 'routing'},
debug => 1,
});
my $member_loop = [];
for my $routing ( @routinglist ) {
my $member=GetMember('borrowernumber' => $routing->{borrowernumber});