From 03b7f7bae23f16778c8fbe328e44614481c0023c Mon Sep 17 00:00:00 2001
From: senator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Thu, 2 Sep 2010 18:45:28 +0000
Subject: [PATCH] Circ/Booking: replace checks for the CAPTURE_RESERVATION
 permission with 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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Booking.pm b/Open-ILS/src/perlmods/OpenILS/Application/Booking.pm
index 97a1941091..ff9572ac79 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Booking.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Booking.pm
@@ -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([
-- 
2.11.0