Lines 156-161
my ($template, $loggedinuser, $cookie)
Link Here
|
156 |
|
156 |
|
157 |
# Does the user have a restricted item editing permission? |
157 |
# Does the user have a restricted item editing permission? |
158 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
158 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
|
|
159 |
|
160 |
my $item = $itemnumber ? Koha::Items->find( $itemnumber ) : undef; |
161 |
if ( $item && !$patron->can_edit_item( $item ) ) { |
162 |
print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); |
163 |
exit; |
164 |
} |
165 |
|
159 |
my $uid = $patron->userid; |
166 |
my $uid = $patron->userid; |
160 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
167 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
161 |
# In case user is a superlibrarian, editing is not restricted |
168 |
# In case user is a superlibrarian, editing is not restricted |
Lines 514-520
if ($op eq "additem") {
Link Here
|
514 |
push @errors,"barcode_not_unique"; |
521 |
push @errors,"barcode_not_unique"; |
515 |
$current_item = $item->unblessed; # Restore edit form for the same item |
522 |
$current_item = $item->unblessed; # Restore edit form for the same item |
516 |
} else { |
523 |
} else { |
|
|
524 |
<<<<<<< HEAD |
517 |
my $newitemlost = $item->itemlost; |
525 |
my $newitemlost = $item->itemlost; |
|
|
526 |
======= |
527 |
my $newitem = ModItemFromMarc($itemtosave, $biblionumber, $itemnumber); |
528 |
$itemnumber = q{}; |
529 |
my $olditemlost = $item->itemlost; |
530 |
my $newitemlost = $newitem->{itemlost}; |
531 |
>>>>>>> 5b37193b6fe (Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item) |
518 |
if ( $newitemlost && $newitemlost ge '1' && !$olditemlost ) { |
532 |
if ( $newitemlost && $newitemlost ge '1' && !$olditemlost ) { |
519 |
LostItem( $item->itemnumber, 'additem' ); |
533 |
LostItem( $item->itemnumber, 'additem' ); |
520 |
} |
534 |
} |
521 |
- |
|
|