Bugzilla – Attachment 172407 Details for
Bug 38094
Librarians with only fast add permission can no longer edit existing fast add records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38094: (follow-up) edit_catalogue implies fast_cataloguing
Bug-38094-follow-up-editcatalogue-implies-fastcata.patch (text/plain), 1.89 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-10-04 14:42:58 UTC
(
hide
)
Description:
Bug 38094: (follow-up) edit_catalogue implies fast_cataloguing
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-10-04 14:42:58 UTC
Size:
1.89 KB
patch
obsolete
>From c20dc035dd921b910a13b9c55270f092c6250994 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 4 Oct 2024 11:41:12 -0300 >Subject: [PATCH] Bug 38094: (follow-up) edit_catalogue implies > fast_cataloguing > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Biblio.pm | 5 ++++- > t/db_dependent/Koha/Biblio.t | 3 ++- > 2 files changed, 6 insertions(+), 2 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 5ef19b48c99..8829a3e63c5 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -263,7 +263,10 @@ sub can_be_edited { > Koha::Exceptions::MissingParameter->throw( error => "The patron parameter is missing or invalid" ) > unless $patron && ref($patron) eq 'Koha::Patron'; > >- my $editcatalogue = $self->frameworkcode eq 'FA' ? 'fast_cataloging' : 'edit_catalogue'; >+ my $editcatalogue = >+ $self->frameworkcode eq 'FA' >+ ? [ 'fast_cataloging', 'edit_catalogue' ] >+ : 'edit_catalogue'; > > return ( > ( $self->metadata->source_allows_editing && $patron->has_permission( { editcatalogue => $editcatalogue } ) ) >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index 25abfec30f9..f768f8a6f71 100755 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -1744,7 +1744,7 @@ subtest 'opac_summary_html' => sub { > > subtest 'can_be_edited() tests' => sub { > >- plan tests => 8; >+ plan tests => 9; > > $schema->storage->txn_begin; > >@@ -1789,6 +1789,7 @@ subtest 'can_be_edited() tests' => sub { > > ok( !$biblio->can_be_edited($fa_patron), "Fast add permissions are not enough" ); > ok( $fa_biblio->can_be_edited($fa_patron), "Fast add user can edit FA records" ); >+ ok( $fa_biblio->can_be_edited($patron), "edit_catalogue user can edit FA records" ); > > # Mock the record source doesn't allow direct editing > $source_allows_editing = 0; >-- >2.46.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38094
:
172402
|
172403
|
172404
|
172405
|
172406
|
172407
|
172408
|
172409
|
172410