Backport r17447 from trunk: fix wrong-headed permissions tests in booking
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 15 Nov 2010 15:05:41 +0000 (15:05 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 15 Nov 2010 15:05:41 +0000 (15:05 +0000)
This should have been backported to rel_1_6 immediately. :-(

git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@18733 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Booking.pm

index 97a1941..ff9572a 100644 (file)
@@ -791,7 +791,7 @@ sub could_capture {
 
     my $e = new_editor("authtoken" => $auth);
     return $e->die_event unless $e->checkauth;
-    return $e->die_event unless $e->allowed("CAPTURE_RESERVATION");
+    return $e->die_event unless $e->allowed("COPY_CHECKIN");
 
     my $dt_parser = new DateTime::Format::ISO8601;
     my $now = now DateTime; # sic
@@ -940,7 +940,7 @@ sub capture_resource_for_reservation {
 
     my $e = new_editor(authtoken => $auth);
     return $e->die_event unless $e->checkauth;
-    return $e->die_event unless $e->allowed("CAPTURE_RESERVATION");
+    return $e->die_event unless $e->allowed("COPY_CHECKIN");
 
     my $uncaptured = get_uncaptured_bresv_for_brsrc(
         $e, {"barcode" => $barcode}
@@ -987,7 +987,7 @@ sub capture_reservation {
 
     my $e = new_editor("xact" => 1, "authtoken" => $auth);
     return $e->die_event unless $e->checkauth;
-    return $e->die_event unless $e->allowed('CAPTURE_RESERVATION');
+    return $e->die_event unless $e->allowed("COPY_CHECKIN");
     my $here = $e->requestor->ws_ou;
 
     my $reservation = $e->retrieve_booking_reservation([