[open-ils-commits] r20396 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed May 4 00:42:08 EDT 2011


Author: miker
Date: 2011-05-04 00:42:04 -0400 (Wed, 04 May 2011)
New Revision: 20396

Modified:
   branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
Patch from Michael Peters to protect cut-in-line holds from staff without the appropriate permission

Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2011-05-04 04:40:39 UTC (rev 20395)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2011-05-04 04:42:04 UTC (rev 20396)
@@ -793,6 +793,16 @@
         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 



More information about the open-ils-commits mailing list