From aa44165239028a985bb2e7f7c7c346db08acaeb5 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 3 Oct 2024 14:09:18 +0000 Subject: [PATCH] Bug 38076: Fix inability of fast catalogers to add/edit FA framework records If a librarian does not have the editcatalogue permission, but does have the fast_cataloging permission, they should be able to add and edit fast cataloging records. Instead they are presented with a login screen and the message that they do not have sufficient permissions. Test Plan: 1) Create a librarian with only fast add cataloging permissions 2) Attempt to create a fast cat item from the circ menu 3) Note the login screen and error 4) Apply this patch 5) Restart all the things! 6) Try again, you can now create FA records! Signed-off-by: Brendan Lawlor Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer (cherry picked from commit 5b124f7a1eededdeb4c4f3d914453f042e6b060b) Signed-off-by: Lucas Gass --- cataloguing/addbiblio.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 397d1c92fe..4ff9fc3151 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -517,6 +517,13 @@ my $fa_duedatespec = $input->param('duedatespec'); my $userflags = 'edit_catalogue'; +$frameworkcode = &GetFrameworkCode($biblionumber) + if ( $biblionumber and not( defined $frameworkcode) and $op ne 'cud-addbiblio' ); + +if ($frameworkcode eq 'FA'){ + $userflags = 'fast_cataloging'; +} + my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => "cataloguing/addbiblio.tt", @@ -526,13 +533,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -$frameworkcode = &GetFrameworkCode($biblionumber) - if ( $biblionumber and not( defined $frameworkcode) and $op ne 'cud-addbiblio' ); - -if ($frameworkcode eq 'FA'){ - $userflags = 'fast_cataloging'; -} - $frameworkcode = '' if ( $frameworkcode eq 'Default' ); # Set default values for global variable -- 2.39.5