Bugzilla – Attachment 172406 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: Allow librarians with fast add permissions to edit existing fast add records
Bug-38094-Allow-librarians-with-fast-add-permissio.patch (text/plain), 1.50 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-10-04 14:42:55 UTC
(
hide
)
Description:
Bug 38094: Allow librarians with fast add permissions to edit existing fast add records
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-10-04 14:42:55 UTC
Size:
1.50 KB
patch
obsolete
>From e571292f2ba02d72c63baba246fab35b7f2706d4 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 4 Oct 2024 10:10:13 -0400 >Subject: [PATCH] Bug 38094: Allow librarians with fast add permissions to edit > existing fast add records > >The ability to create fast add records was fixed on bug 38076, but they still cannot be edited after they are saved. > >Test Plan: >1) Create a librarian with only fast add cataloging permissions >2) Create a fast add record, save it >3) Attempt to edit that record, you cannot! >4) Apply this patch >5) Restart all the things! >6) Attempt to edit that record, you can! >7) Attempt to edit a non-FA record, you cannot! >--- > Koha/Biblio.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 0f9d4cd877b..5ef19b48c99 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -263,8 +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'; >+ > return ( >- ( $self->metadata->source_allows_editing && $patron->has_permission( { editcatalogue => 'edit_catalogue' } ) ) >+ ( $self->metadata->source_allows_editing && $patron->has_permission( { editcatalogue => $editcatalogue } ) ) > || $patron->has_permission( { editcatalogue => 'edit_locked_records' } ) ) ? 1 : 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