| 
      
            Lines 34-39
          use Koha::AuthorisedValueCategories;
      
      
        Link Here
      
     | 
  
        
          | 34 | 
          use Koha::AuthorisedValues;  | 
          34 | 
          use Koha::AuthorisedValues;  | 
        
        
          | 35 | 
          use Koha::MarcSubfieldStructures;  | 
          35 | 
          use Koha::MarcSubfieldStructures;  | 
        
        
          | 36 | 
          use Koha::Exception;  | 
          36 | 
          use Koha::Exception;  | 
        
            
               | 
               | 
              37 | 
              use Koha::BiblioFrameworks;  | 
            
        
          | 37 | 
           | 
          38 | 
           | 
        
        
          | 38 | 
          use MARC::Field;  | 
          39 | 
          use MARC::Field;  | 
        
        
          | 39 | 
          use MARC::Record;  | 
          40 | 
          use MARC::Record;  | 
        
  
    | 
      
            Lines 1765-1771
          subtest 'opac_summary_html' => sub {
      
      
        Link Here
      
     | 
  
        
          | 1765 | 
           | 
          1766 | 
           | 
        
        
          | 1766 | 
          subtest 'can_be_edited() tests' => sub { | 
          1767 | 
          subtest 'can_be_edited() tests' => sub { | 
        
        
          | 1767 | 
           | 
          1768 | 
           | 
        
          
            
              | 1768 | 
                  plan tests => 9;  | 
              1769 | 
                  plan tests => 11;  | 
            
        
          | 1769 | 
           | 
          1770 | 
           | 
        
        
          | 1770 | 
              $schema->storage->txn_begin;  | 
          1771 | 
              $schema->storage->txn_begin;  | 
        
        
          | 1771 | 
           | 
          1772 | 
           | 
        
  
    | 
      
            Lines 1796-1801
          subtest 'can_be_edited() tests' => sub {
      
      
        Link Here
      
     | 
  
        
          | 1796 | 
              my $fa_biblio = $builder->build_sample_biblio( { frameworkcode => 'FA' } ); | 
          1797 | 
              my $fa_biblio = $builder->build_sample_biblio( { frameworkcode => 'FA' } ); | 
        
        
          | 1797 | 
              my $fa_patron = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 0 } } ); | 
          1798 | 
              my $fa_patron = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 0 } } ); | 
        
        
          | 1798 | 
           | 
          1799 | 
           | 
        
            
               | 
               | 
              1800 | 
                  my $is_fa_framework =  | 
            
            
              | 1801 | 
                      $builder->build_object( { class => 'Koha::BiblioFrameworks', value => { is_fast_add => 1 } } ); | 
            
            
              | 1802 | 
                  my $is_fa_biblio = $builder->build_sample_biblio( { frameworkcode => $is_fa_framework->frameworkcode } ); | 
            
            
              | 1803 | 
               | 
            
        
          | 1799 | 
              # Add editcatalogue => edit_catalog subpermission  | 
          1804 | 
              # Add editcatalogue => edit_catalog subpermission  | 
        
        
          | 1800 | 
              $builder->build(  | 
          1805 | 
              $builder->build(  | 
        
        
          | 1801 | 
                  { | 
          1806 | 
                  { | 
        
  
    | 
      
            Lines 1808-1816
          subtest 'can_be_edited() tests' => sub {
      
      
        Link Here
      
     | 
  
        
          | 1808 | 
                  }  | 
          1813 | 
                  }  | 
        
        
          | 1809 | 
              );  | 
          1814 | 
              );  | 
        
        
          | 1810 | 
           | 
          1815 | 
           | 
        
          
            
              | 1811 | 
                  ok( !$biblio->can_be_edited($fa_patron),   "Fast add permissions are not enough" );  | 
              1816 | 
                  ok( !$biblio->can_be_edited($fa_patron),      "Fast add permissions are not enough" );  | 
            
            
              | 1812 | 
                  ok( $fa_biblio->can_be_edited($fa_patron), "Fast add user can edit FA records" );  | 
              1817 | 
                  ok( $fa_biblio->can_be_edited($fa_patron),    "Fast add user can edit FA records" );  | 
            
            
              | 1813 | 
                  ok( $fa_biblio->can_be_edited($patron),    "edit_catalogue user can edit FA records" );  | 
              1818 | 
                  ok( $fa_biblio->can_be_edited($patron),       "edit_catalogue user can edit FA records" );  | 
            
            
               | 
               | 
              1819 | 
                  ok( $is_fa_biblio->can_be_edited($fa_patron), "Fast add user can edit is_fast_add records" );  | 
            
            
              | 1820 | 
                  ok( $is_fa_biblio->can_be_edited($patron),    "edit_catalogue user can edit is_fast_add records" );  | 
            
        
          | 1814 | 
           | 
          1821 | 
           | 
        
        
          | 1815 | 
              # Mock the record source doesn't allow direct editing  | 
          1822 | 
              # Mock the record source doesn't allow direct editing  | 
        
        
          | 1816 | 
              $source_allows_editing = 0;  | 
          1823 | 
              $source_allows_editing = 0;  | 
        
            
              | 1817 | 
              -   | 
               | 
               |