[open-ils-commits] r14700 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Oct 30 09:46:43 EDT 2009


Author: erickson
Date: 2009-10-30 09:46:41 -0400 (Fri, 30 Oct 2009)
New Revision: 14700

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
wrap permission and status check around hold request time changing

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2009-10-30 13:24:18 UTC (rev 14699)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2009-10-30 13:46:41 UTC (rev 14700)
@@ -694,6 +694,14 @@
 
 
     # --------------------------------------------------------------
+    # Changing the request time is like playing God
+    # --------------------------------------------------------------
+    if($hold->request_time ne $orig_hold->request_time) {
+        return OpenILS::Event->new('BAD_PARAMS') if $hold->fulfillment_time;
+        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 
     # lib changes we need to create a new transit.
     # --------------------------------------------------------------



More information about the open-ils-commits mailing list