From 5aaa2d6b8fcc9512a89ec3fc35a0c5fe1bbf142c Mon Sep 17 00:00:00 2001 From: erickson Date: Sun, 4 Nov 2007 20:04:04 +0000 Subject: [PATCH] removed a redundant piece of hold permission logic. A long time ago, the code checked 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 --- .../src/perlmods/OpenILS/Application/Circ/Holds.pm | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm index 8ce6d5ad37..734a39aa59 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -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", -- 2.11.0