removed a redundant piece of hold permission logic. A long time ago, the code checked
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 4 Nov 2007 20:04:04 +0000 (20:04 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 4 Nov 2007 20:04:04 +0000 (20:04 +0000)
the permission of the recipient for a given type of hold, then fell back to checking the
perms on the requestor.

Now, we only check the permisssions of the requestor, so the extra check was redundant.

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

Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm

index 8ce6d5a..734a39a 100644 (file)
@@ -199,16 +199,7 @@ sub __create_hold {
 
                # is this user allowed to have holds of this type?
                $perm = _check_holds_perm($type, $hold->requestor, $recipient->home_ou);
-               if($perm) { 
-                       #if there is a requestor, see if the requestor has override privelages
-                       if($hold->requestor ne $hold->usr) {
-                               $perm = _check_request_holds_override($user->id, $user->home_ou);
-                               if($perm) {return $perm;}
-
-                       } else {
-                               return $perm; 
-                       }
-               }
+        return $perm if $perm;
 
                #enforce the fact that the login is the one requesting the hold
                $hold->requestor($user->id); 
@@ -270,15 +261,6 @@ sub _check_request_holds_perm {
        }
 }
 
-sub _check_request_holds_override {
-       my $user_id = shift;
-       my $org_id = shift;
-       if(my $evt = $apputils->check_perms(
-               $user_id, $org_id, "REQUEST_HOLDS_OVERRIDE")) {
-               return $evt;
-       }
-}
-
 __PACKAGE__->register_method(
        method  => "retrieve_holds_by_id",
        api_name        => "open-ils.circ.holds.retrieve_by_id",