From 447012f564ffbaa49b462d72e2959316edbdb790 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 4 May 2011 04:40:16 +0000 Subject: [PATCH] Patch from Michael Peters to protect cut-in-line holds from staff without the appropriate permission git-svn-id: svn://svn.open-ils.org/ILS/trunk@20394 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index 6ce869190..f56a52da4 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -795,6 +795,16 @@ sub update_hold_impl { return OpenILS::Event->new('BAD_PARAMS') if $hold->fulfillment_time; return $e->die_event unless $e->allowed('UPDATE_HOLD_REQUEST_TIME', $hold->pickup_lib); } + + + # -------------------------------------------------------------- + # Code for making sure staff have appropriate permissons for cut_in_line + # This, as is, doesn't prevent a user from cutting their own holds in line + # but needs to + # -------------------------------------------------------------- + if($U->is_true($hold->cut_in_line) ne $U->is_true($orig_hold->cut_in_line)) { + return $e->die_event unless $e->allowed('UPDATE_HOLD_REQUEST_TIME', $hold->pickup_lib); + } # -------------------------------------------------------------- # if the hold is on the holds shelf or in transit and the pickup -- 2.11.0