Bug 7673: Change the superlibrarian check
To know if the user is a superlibrarian, we have to call C4::Context->IsSuperLibrarian Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
186ef8b858
commit
107e2a0dfb
|
|
@ -372,7 +372,7 @@ my ($template, $loggedinuser, $cookie)
|
|||
my $uid = $loggedinuser ? GetMember( borrowernumber => $loggedinuser )->{userid} : undef;
|
||||
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef;
|
||||
# In case user is a superlibrarian, edition is not restricted
|
||||
$restrictededition = 0 if ($restrictededition != 0 && $restrictededition->{'superlibrarian'} eq 1);
|
||||
$restrictededition = 0 if ($restrictededition != 0 && C4::Context->IsSuperLibrarian());
|
||||
# In case user has fast cataloging permission (and we're in fast cataloging), edition is not restricted
|
||||
$restrictededition = 0 if ($restrictededition != 0 && $frameworkcode eq 'FA' && haspermission($uid, {'editcatalogue' => 'fast_cataloging'}));
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ my ($template, $loggedinuser, $cookie)
|
|||
my $uid = $loggedinuser ? GetMember( borrowernumber => $loggedinuser )->{userid} : undef;
|
||||
my $restrictededition = $uid ? haspermission($uid, {'tools' => 'items_batchmod_restricted'}) : undef;
|
||||
# In case user is a superlibrarian, edition is not restricted
|
||||
$restrictededition = 0 if ($restrictededition != 0 && $restrictededition->{'superlibrarian'} eq 1);
|
||||
$restrictededition = 0 if ($restrictededition != 0 && C4::Context->IsSuperLibrarian());
|
||||
|
||||
my $today_iso = C4::Dates->today('iso');
|
||||
$template->param(today_iso => $today_iso);
|
||||
|
|
|
|||
Loading…
Reference in New Issue