Bugzilla – Attachment 181152 Details for
Bug 25015
Staff with 'Edit Iitems' permission currently can not edit Items attached to a fast add framework
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25015: Allow staff with edit_items permissions to edit fast add items
Bug-25015-Allow-staff-with-edititems-permissions-t.patch (text/plain), 2.46 KB, created by
Marcel de Rooy
on 2025-04-18 08:02:30 UTC
(
hide
)
Description:
Bug 25015: Allow staff with edit_items permissions to edit fast add items
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-04-18 08:02:30 UTC
Size:
2.46 KB
patch
obsolete
>From 0523a5a428c738ea1a65b583da557ca2155d6510 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Fri, 21 Mar 2025 09:42:25 -0400 >Subject: [PATCH] Bug 25015: Allow staff with edit_items permissions to edit > fast add items >Content-Type: text/plain; charset=utf-8 > >To test: >1. Set up a user with only catalogue and edit_items permissions >2. Create a Fast Add record with item > a. Go to Cataloging > b. Click on Fast Cataloging > c. Fill in mandatory fields and save the record > d. Fill in mandatory item fields and click Add item >3. Log in as the user you set up in step 1 >4. Search for the record you created in step 2 >5. Click Edit > Manage items in the menu at the top of the record >==> You do not have permission to access this page! >6. Go back to biblio record page >7. Apply patch and restart_all >8. Click Edit > Manage items again >==> Edit items page loads normally >9. Make a few edits and confirm that they save correctly > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> >--- > cataloguing/additem.pl | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 3d361ec1e6..4c9e3631fa 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -144,13 +144,13 @@ my $display_order = $input->param('item_group_display_order'); > our $frameworkcode = &GetFrameworkCode($biblionumber); > > # Defining which userflag is needing according to the framework currently used >-my $userflags; >+my $fast_cataloging_mode; > if ( defined $input->param('frameworkcode') ) { >- $userflags = ( $input->param('frameworkcode') eq 'FA' ) ? "fast_cataloging" : "edit_items"; >+ $fast_cataloging_mode = ( $input->param('frameworkcode') eq 'FA' ) ? 1 : 0; > } > >-if ( not defined $userflags ) { >- $userflags = ( $frameworkcode eq 'FA' ) ? "fast_cataloging" : "edit_items"; >+if ( not defined $fast_cataloging_mode ) { >+ $fast_cataloging_mode = ( $frameworkcode eq 'FA' ) ? 1 : 0; > } > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >@@ -158,7 +158,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > template_name => "cataloguing/additem.tt", > query => $input, > type => "intranet", >- flagsrequired => { editcatalogue => $userflags }, >+ flagsrequired => >+ { editcatalogue => $fast_cataloging_mode ? [ 'fast_cataloging', 'edit_items' ] : 'edit_items' }, > } > ); > >-- >2.39.5
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 25015
:
179611
|
179612
|
179896
| 181152 |
181153