Bug 5376: Batch Mod and Delete require superlibrarian permissions
This only occurs with IndependantBranches turned on; in an attempt to check that the items being
modified belonged to the user's branch, the code made a simultaneous comparison and assignment,
which is not permitted in all compilations of Perl.
Splitting the assignment of $itembranchcode and the check for its non-null value fixes the problem
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 12c116236f)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
07ba717450
commit
cc3ba2c1ab
|
|
@ -429,7 +429,8 @@ sub BuildItemsData{
|
|||
my %this_row;
|
||||
foreach my $field (grep {$_->tag() eq $itemtagfield} $itemmarc->fields()) {
|
||||
# loop through each subfield
|
||||
if (my $itembranchcode=$field->subfield($branchtagsubfield) && C4::Context->preference("IndependantBranches")) {
|
||||
my $itembranchcode=$field->subfield($branchtagsubfield);
|
||||
if ($itembranchcode && C4::Context->preference("IndependantBranches")) {
|
||||
#verifying rights
|
||||
my $userenv = C4::Context->userenv();
|
||||
unless (($userenv->{'flags'} == 1) or (($userenv->{'branch'} eq $itembranchcode))){
|
||||
|
|
|
|||
Loading…
Reference in New Issue