From: erickson Date: Mon, 6 Aug 2007 23:30:26 +0000 (+0000) Subject: added a method to return a list of workstations objects by owning lib X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3a3433e17338287a707bcce0c1c2e624cf3b4a33;p=Evergreen.git added a method to return a list of workstations objects by owning lib git-svn-id: svn://svn.open-ils.org/ILS/trunk@7623 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index d0e5bea02e..35a8c5c100 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -2485,6 +2485,35 @@ sub register_workstation { return $ws->id; # note: editor sets the id on the new object for us } +__PACKAGE__->register_method ( + method => 'workstation_list', + api_name => 'open-ils.actor.workstation.list', + signature => q/ + Returns a list of workstations registered at the given location + @param authtoken The login session key + @param ids A list of org_unit.id's for the workstation owners + /); + +sub workstation_list { + my( $self, $conn, $authtoken, @orgs ) = @_; + + my $e = new_editor(authtoken=>$authtoken); + return $e->event unless $e->checkauth; + my %results; + + for my $o (@orgs) { + return $e->event + unless $e->allowed('REGISTER_WORKSTATION', $o); + $results{$o} = $e->search_actor_workstation({owning_lib=>$o}); + } + return \%results; +} + + + + + + __PACKAGE__->register_method ( method => 'fetch_patron_note',