[open-ils-commits] r11660 - trunk/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Dec 23 10:39:31 EST 2008
Author: erickson
Date: 2008-12-23 10:39:29 -0500 (Tue, 23 Dec 2008)
New Revision: 11660
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Log:
added support for friends viewing checkouts
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2008-12-23 15:39:13 UTC (rev 11659)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2008-12-23 15:39:29 UTC (rev 11660)
@@ -1845,9 +1845,16 @@
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 ) {
- return $e->event unless $e->allowed('VIEW_CIRCULATIONS');
+ unless($e->allowed('VIEW_CIRCULATIONS', $user->home_ou)) {
+
+ # see if there is a friend link allowing circ.view perms
+ my $allowed = OpenILS::Application::Actor::Friends->friend_perm_allowed(
+ $e, $userid, $e->requestor->id, 'circ.view');
+ return $e->event unless $allowed;
+ }
}
my $count = $self->api_name =~ /count/;
More information about the open-ils-commits
mailing list