From a31a8e86aae880febafa0fa94c1d013ca15c2275 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Thu, 5 Sep 2019 23:51:46 -0400 Subject: [PATCH] LP#1068287 UI tweak and renewal behavior Skips the CREATE_PRECAT permission check when renewing pre-cataloged items. Also disables all the elements except the Cancel button in the Pre-Cat dialog when the user lacks the CREATE_PRECAT permission, and repositions the explanatory text. Also includes release notes. Signed-off-by: Jason Etheridge Signed-off-by: Galen Charlton --- .../lib/OpenILS/Application/Circ/Circulate.pm | 2 +- .../templates/staff/circ/share/t_precat_dialog.tt2 | 14 ++++++++++---- .../Circulation/create-precat-permission.adoc | 13 +++++++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/create-precat-permission.adoc diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index edf05860d1..5c810d6826 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -2427,7 +2427,7 @@ sub make_precat_copy { my $self = shift; my $copy = $self->copy; return $self->bail_on_events(OpenILS::Event->new('PERM_FAILURE')) - unless $self->editor->allowed('CREATE_PRECAT'); + unless $self->editor->allowed('CREATE_PRECAT') || $self->is_renewal; if($copy) { $logger->debug("circulator: Pre-cat copy already exists in checkout: ID=" . $copy->id); diff --git a/Open-ILS/src/templates/staff/circ/share/t_precat_dialog.tt2 b/Open-ILS/src/templates/staff/circ/share/t_precat_dialog.tt2 index d28023a60d..e24db428ba 100644 --- a/Open-ILS/src/templates/staff/circ/share/t_precat_dialog.tt2 +++ b/Open-ILS/src/templates/staff/circ/share/t_precat_dialog.tt2 @@ -8,27 +8,34 @@ +
+ [% l('You do not have permission to create a pre-cataloged item with this barcode.') %] +