| 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 509-515
          if ($op eq "additem") {
      
      
        Link Here | 
        
          | 509 |         push @errors,"barcode_not_unique"; | 516 |         push @errors,"barcode_not_unique"; | 
        
          | 510 |         $current_item = $item->unblessed; # Restore edit form for the same item | 517 |         $current_item = $item->unblessed; # Restore edit form for the same item | 
        
          | 511 |     } else { | 518 |     } else { | 
            
              |  |  | 519 | <<<<<<< HEAD | 
        
          | 512 |         my $newitemlost = $item->itemlost; | 520 |         my $newitemlost = $item->itemlost; | 
            
              |  |  | 521 | ======= | 
            
              | 522 |         my $newitem = ModItemFromMarc($itemtosave, $biblionumber, $itemnumber); | 
            
              | 523 |         $itemnumber = q{}; | 
            
              | 524 |         my $olditemlost = $item->itemlost; | 
            
              | 525 |         my $newitemlost = $newitem->{itemlost}; | 
            
              | 526 | >>>>>>> 5b37193b6fe (Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item) | 
        
          | 513 |         if ( $newitemlost && $newitemlost ge '1' && !$olditemlost ) { | 527 |         if ( $newitemlost && $newitemlost ge '1' && !$olditemlost ) { | 
        
          | 514 |             LostItem( $item->itemnumber, 'additem' ); | 528 |             LostItem( $item->itemnumber, 'additem' ); | 
        
          | 515 |         } | 529 |         } | 
            
              | 516 | -  |  |  |