only fetch the user if needed for perm checking
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 23 Dec 2008 18:06:02 +0000 (18:06 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 23 Dec 2008 18:06:02 +0000 (18:06 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11663 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor.pm

index 2d183ec..45d29cf 100644 (file)
@@ -1845,9 +1845,9 @@ sub checked_out {
 
        my $e = new_editor(authtoken=>$auth);
        return $e->event unless $e->checkauth;
-    my $user = $e->retrieve_actor_user($userid) or return $e->event;
 
        if( $userid ne $e->requestor->id ) {
+        my $user = $e->retrieve_actor_user($userid) or return $e->event;
                unless($e->allowed('VIEW_CIRCULATIONS', $user->home_ou)) {
 
             # see if there is a friend link allowing circ.view perms