Circ/Booking: replace checks for the CAPTURE_RESERVATION permission with
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 2 Sep 2010 18:45:28 +0000 (18:45 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 2 Sep 2010 18:45:28 +0000 (18:45 +0000)
checks for COPY_CHECKIN

There's no such permission as CAPTURE_HOLD, so why should reservations be
different?  Also, testing for reservations to capture during normal checkin
was making trouble for users if they didn't have CAPTURE_RESERVATION.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17447 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([