View | Details | Raw Unified | Return to bug 38094
Collapse All | Expand All

(-)a/Koha/Biblio.pm (-1 / +4 lines)
Lines 263-269 sub can_be_edited { Link Here
263
    Koha::Exceptions::MissingParameter->throw( error => "The patron parameter is missing or invalid" )
263
    Koha::Exceptions::MissingParameter->throw( error => "The patron parameter is missing or invalid" )
264
        unless $patron && ref($patron) eq 'Koha::Patron';
264
        unless $patron && ref($patron) eq 'Koha::Patron';
265
265
266
    my $editcatalogue = $self->frameworkcode eq 'FA' ? 'fast_cataloging' : 'edit_catalogue';
266
    my $editcatalogue =
267
        $self->frameworkcode eq 'FA'
268
        ? [ 'fast_cataloging', 'edit_catalogue' ]
269
        : 'edit_catalogue';
267
270
268
    return (
271
    return (
269
        ( $self->metadata->source_allows_editing && $patron->has_permission( { editcatalogue => $editcatalogue } ) )
272
        ( $self->metadata->source_allows_editing && $patron->has_permission( { editcatalogue => $editcatalogue } ) )
(-)a/t/db_dependent/Koha/Biblio.t (-2 / +2 lines)
Lines 1744-1750 subtest 'opac_summary_html' => sub { Link Here
1744
1744
1745
subtest 'can_be_edited() tests' => sub {
1745
subtest 'can_be_edited() tests' => sub {
1746
1746
1747
    plan tests => 8;
1747
    plan tests => 9;
1748
1748
1749
    $schema->storage->txn_begin;
1749
    $schema->storage->txn_begin;
1750
1750
Lines 1789-1794 subtest 'can_be_edited() tests' => sub { Link Here
1789
1789
1790
    ok( !$biblio->can_be_edited($fa_patron),   "Fast add permissions are not enough" );
1790
    ok( !$biblio->can_be_edited($fa_patron),   "Fast add permissions are not enough" );
1791
    ok( $fa_biblio->can_be_edited($fa_patron), "Fast add user can edit FA records" );
1791
    ok( $fa_biblio->can_be_edited($fa_patron), "Fast add user can edit FA records" );
1792
    ok( $fa_biblio->can_be_edited($patron),    "edit_catalogue user can edit FA records" );
1792
1793
1793
    # Mock the record source doesn't allow direct editing
1794
    # Mock the record source doesn't allow direct editing
1794
    $source_allows_editing = 0;
1795
    $source_allows_editing = 0;
1795
- 

Return to bug 38094