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 <blawlor@clamsnet.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5b124f7a1e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2024-10-03 14:09:18 +00:00 committed by Lucas Gass
parent 1a71b12702
commit aa44165239
1 changed files with 7 additions and 7 deletions

View File

@ -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