[open-ils-commits] r7995 -
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Nov 4 15:19:23 EST 2007
Author: erickson
Date: 2007-11-04 15:04:04 -0500 (Sun, 04 Nov 2007)
New Revision: 7995
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
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.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2007-11-04 19:47:31 UTC (rev 7994)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2007-11-04 20:04:04 UTC (rev 7995)
@@ -199,17 +199,8 @@
# 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;}
+ return $perm if $perm;
- } else {
- return $perm;
- }
- }
-
#enforce the fact that the login is the one requesting the hold
$hold->requestor($user->id);
$hold->selection_ou($recipient->home_ou) unless $hold->selection_ou;
@@ -270,15 +261,6 @@
}
}
-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",
More information about the open-ils-commits
mailing list