[open-ils-commits] r8947 - in
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application:
. Actor Circ Search
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Mar 9 22:41:10 EDT 2008
Author: dbs
Date: 2008-03-09 22:08:11 -0400 (Sun, 09 Mar 2008)
New Revision: 8947
Modified:
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Collections.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
Merge changes from trunk to fix workstation registration and the like
svn merge -r8766:8767 svn://svn.open-ils.org/ILS/trunk
svn merge -r8704:8705 svn://svn.open-ils.org/ILS/trunk
svn merge -r8807:8808 svn://svn.open-ils.org/ILS/trunk
svn merge -r8664:8666 svn://svn.open-ils.org/ILS/trunk
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm 2008-03-10 02:06:38 UTC (rev 8946)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm 2008-03-10 02:08:11 UTC (rev 8947)
@@ -13,6 +13,7 @@
__PACKAGE__->register_method(
method => 'get_users_from_usergroup',
api_name => 'open-ils.actor.usergroup.members.retrieve',
+ authoritative => 1,
signature => q/
Returns a list of ids for users that are in the given usergroup
/
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2008-03-10 02:06:38 UTC (rev 8946)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2008-03-10 02:08:11 UTC (rev 8947)
@@ -914,6 +914,7 @@
__PACKAGE__->register_method(
method => "user_retrieve_by_barcode",
+ authoritative => 1,
api_name => "open-ils.actor.user.fleshed.retrieve_by_barcode",);
sub user_retrieve_by_barcode {
@@ -1036,33 +1037,6 @@
}
-# turns an org list into an org tree
-sub build_org_tree {
-
- my( $self, $orglist) = @_;
-
- return $orglist unless ref $orglist;
- return $$orglist[0] if @$orglist == 1;
-
- my @list = sort {
- $a->ou_type <=> $b->ou_type ||
- $a->name cmp $b->name } @$orglist;
-
- for my $org (@list) {
-
- next unless ($org and defined($org->parent_ou));
- my ($parent) = grep { $_->id == $org->parent_ou } @list;
- next unless $parent;
-
- $parent->children([]) unless defined($parent->children);
- push( @{$parent->children}, $org );
- }
-
- return $list[0];
-
-}
-
-
__PACKAGE__->register_method(
method => "get_org_descendants",
api_name => "open-ils.actor.org_tree.descendants.retrieve"
@@ -1075,7 +1049,7 @@
"open-ils.storage",
"open-ils.storage.actor.org_unit.descendants.atomic",
$org_unit, $depth );
- return $self->build_org_tree($orglist);
+ return $U->build_org_tree($orglist);
}
@@ -1091,7 +1065,7 @@
"open-ils.storage",
"open-ils.storage.actor.org_unit.ancestors.atomic",
$org_unit, $depth );
- return $self->build_org_tree($orglist);
+ return $U->build_org_tree($orglist);
}
@@ -1294,26 +1268,11 @@
$authtoken, $userid, 'VIEW_PERMISSION' );
return $evt if $evt;
- my $tree = $self->get_org_tree();
- return _find_highest_perm_org( $perm, $userid, $target->ws_ou, $tree );
+ my $tree = $U->get_org_tree();
+ return $U->find_highest_perm_org( $perm, $userid, $target->ws_ou, $tree );
}
-sub _find_highest_perm_org {
- my ( $perm, $userid, $start_org, $org_tree ) = @_;
- my $org = $apputils->find_org($org_tree, $start_org );
-
- my $lastid = -1;
- while( $org ) {
- last if ($apputils->check_perms( $userid, $org->id, $perm )); # perm failed
- $lastid = $org->id;
- $org = $apputils->find_org( $org_tree, $org->parent_ou() );
- }
-
- return $lastid;
-}
-
-
__PACKAGE__->register_method(
method => 'check_user_work_perms',
api_name => 'open-ils.actor.user.work_perm.highest_org_set',
@@ -1368,10 +1327,10 @@
my @arr;
return [] unless ref($perms);
- my $tree = $self->get_org_tree();
+ my $tree = $U->get_org_tree();
for my $p (@$perms) {
- push( @arr, _find_highest_perm_org( $p, $userid, $target->home_ou, $tree ) );
+ push( @arr, $U->find_highest_perm_org( $p, $userid, $target->home_ou, $tree ) );
}
return \@arr;
}
@@ -1382,6 +1341,7 @@
__PACKAGE__->register_method(
method => "user_fines_summary",
api_name => "open-ils.actor.user.fines.summary",
+ authoritative => 1,
notes => <<" NOTES");
Returns a short summary of the users total open fines, excluding voided fines
Params are login_session, user_id
@@ -1678,6 +1638,7 @@
__PACKAGE__->register_method(
method => "hold_request_count",
api_name => "open-ils.actor.user.hold_requests.count",
+ authoritative => 1,
argc => 1,
notes => <<" NOTES");
Returns hold ready/total counts
@@ -1761,6 +1722,7 @@
__PACKAGE__->register_method(
method => "checked_out",
api_name => "open-ils.actor.user.checked_out",
+ authoritative => 1,
argc => 2,
signature => q/
Returns a structure of circulations objects sorted by
@@ -1778,6 +1740,7 @@
__PACKAGE__->register_method(
method => "checked_out",
api_name => "open-ils.actor.user.checked_out.count",
+ authoritative => 1,
argc => 2,
signature => q/@see open-ils.actor.user.checked_out/
);
@@ -1949,6 +1912,7 @@
__PACKAGE__->register_method(
method => "checked_in_with_fines",
api_name => "open-ils.actor.user.checked_in_with_fines",
+ authoritative => 1,
argc => 2,
signature => q/@see open-ils.actor.user.checked_out/
);
@@ -2011,6 +1975,7 @@
__PACKAGE__->register_method(
method => "user_transaction_history",
api_name => "open-ils.actor.user.transactions.history.have_balance",
+ authoritative => 1,
argc => 1,
notes => <<" NOTES");
Returns a list of billable transaction ids for a user that have a balance, optionally by type
@@ -2025,6 +1990,7 @@
__PACKAGE__->register_method(
method => "user_transaction_history",
api_name => "open-ils.actor.user.transactions.history.have_bill",
+ authoritative => 1,
argc => 1,
notes => <<" NOTES");
Returns a list of billable transaction ids for a user that has billings
@@ -2473,6 +2439,7 @@
__PACKAGE__->register_method (
method => 'fetch_patron_note',
api_name => 'open-ils.actor.note.retrieve.all',
+ authoritative => 1,
signature => q/
Returns a list of notes for a given user
Requestor must have VIEW_USER permission if pub==false and
@@ -2657,20 +2624,19 @@
/
);
-# XXX Make me retun undef if no user has the ID
-
sub usrname_exists {
my( $self, $conn, $auth, $usrname ) = @_;
my $e = new_editor(authtoken=>$auth);
return $e->event unless $e->checkauth;
my $a = $e->search_actor_user({usrname => $usrname, deleted=>'f'}, {idlist=>1});
return $$a[0] if $a and @$a;
- return 0;
+ return undef;
}
__PACKAGE__->register_method(
method => 'barcode_exists',
api_name => 'open-ils.actor.barcode.exists',
+ authoritative => 1,
signature => q/
Returns 1 if the requested barcode exists, returns 0 otherwise
/
@@ -2681,7 +2647,7 @@
my $e = new_editor(authtoken=>$auth);
return $e->event unless $e->checkauth;
my $card = $e->search_actor_card({barcode => $barcode});
- return 0 unless @$card;
+ return undef unless @$card;
return $card->[0]->usr;
}
@@ -2945,7 +2911,7 @@
my($self, $conn, $auth, $user_id) = @_;
# see if we even need to enforce the opt-in value
- return 1 unless $self->user_opt_in_enabled;
+ return 1 unless user_opt_in_enabled($self);
my $e = new_editor(authtoken => $auth);
return $e->event unless $e->checkauth;
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2008-03-10 02:06:38 UTC (rev 8946)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2008-03-10 02:08:11 UTC (rev 8947)
@@ -495,6 +495,7 @@
__PACKAGE__->register_method(
method => "biblio_record_record_metadata",
api_name => "open-ils.cat.biblio.record.metadata.retrieve",
+ authoritative => 1,
argc => 1, #(session_id, biblio_tree )
notes => "Walks the tree and commits any changed nodes " .
"adds any new nodes, and deletes any deleted nodes",
@@ -625,6 +626,7 @@
__PACKAGE__->register_method(
method => "orgs_for_title",
+ authoritative => 1,
api_name => "open-ils.cat.actor.org_unit.retrieve_by_title"
);
@@ -643,6 +645,7 @@
__PACKAGE__->register_method(
method => "retrieve_copies",
+ authoritative => 1,
api_name => "open-ils.cat.asset.copy_tree.retrieve");
__PACKAGE__->register_method(
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm 2008-03-10 02:06:38 UTC (rev 8946)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm 2008-03-10 02:08:11 UTC (rev 8947)
@@ -139,6 +139,7 @@
__PACKAGE__->register_method(
method => 'fetch_loc',
+ authoritative => 1,
api_name => 'open-ils.circ.copy_location.retrieve',
);
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2008-03-10 02:06:38 UTC (rev 8946)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2008-03-10 02:08:11 UTC (rev 8947)
@@ -301,6 +301,7 @@
__PACKAGE__->register_method(
method => "retrieve_holds",
+ authoritative => 1,
api_name => "open-ils.circ.holds.id_list.retrieve",
notes => <<NOTE);
Retrieves all the hold ids for the specified
@@ -1518,6 +1519,7 @@
__PACKAGE__->register_method(
method => 'uber_hold',
+ authoritative => 1,
api_name => 'open-ils.circ.hold.details.retrieve'
);
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm 2008-03-10 02:06:38 UTC (rev 8946)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm 2008-03-10 02:08:11 UTC (rev 8947)
@@ -256,6 +256,7 @@
__PACKAGE__->register_method(
method => "retrieve_payments2",
+ authoritative => 1,
api_name => "open-ils.circ.money.payment.retrieve.all",
notes => "Returns a list of payments attached to a given transaction"
);
@@ -337,6 +338,7 @@
__PACKAGE__->register_method(
method => "billing_items",
+ authoritative => 1,
api_name => "open-ils.circ.money.billing.retrieve.all",
notes =><<" NOTE");
Returns a list of billing items for the given transaction.
@@ -499,6 +501,7 @@
__PACKAGE__->register_method (
method => 'fetch_mbts',
+ authoritative => 1,
api_name => 'open-ils.circ.money.billable_xact_summary.retrieve'
);
sub fetch_mbts {
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm 2008-03-10 02:06:38 UTC (rev 8946)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ/NonCat.pm 2008-03-10 02:08:11 UTC (rev 8947)
@@ -194,6 +194,7 @@
__PACKAGE__->register_method(
method => 'fetch_open_noncats',
+ authoritative => 1,
api_name => 'open-ils.circ.open_non_cataloged_circulation.user',
signature => q/
Returns an id-list of non-cataloged circulations that are considered
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2008-03-10 02:06:38 UTC (rev 8946)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2008-03-10 02:08:11 UTC (rev 8947)
@@ -881,6 +881,7 @@
__PACKAGE__->register_method(
method => 'copy_details_barcode',
+ authoritative => 1,
api_name => 'open-ils.circ.copy_details.retrieve.barcode');
sub copy_details_barcode {
my( $self, $conn, $auth, $barcode ) = @_;
@@ -1051,6 +1052,7 @@
__PACKAGE__->register_method(
method => "fleshed_circ_retrieve",
+ authoritative => 1,
api_name => "open-ils.circ.fleshed.retrieve",);
sub fleshed_circ_retrieve {
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Collections.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Collections.pm 2008-03-10 02:06:38 UTC (rev 8946)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Collections.pm 2008-03-10 02:08:11 UTC (rev 8947)
@@ -120,8 +120,8 @@
# let the client know we're still here
$conn->status( new OpenSRF::DomainObject::oilsContinueStatus );
- return $self->process_users_of_interest_results(
- $conn, $e, $req, $start, $age, $fine_level, $location);
+ return process_users_of_interest_results(
+ $self, $conn, $e, $req, $start, $age, $fine_level, $location);
}
@@ -234,8 +234,8 @@
# let the client know we're still here
$conn->status( new OpenSRF::DomainObject::oilsContinueStatus );
- return $self->process_users_of_interest_results(
- $conn, $e, $req, $start, $start_date, $end_date, $fine_level, @locations);
+ return process_users_of_interest_results(
+ $self, $conn, $e, $req, $start, $start_date, $end_date, $fine_level, @locations);
}
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2008-03-10 02:06:38 UTC (rev 8946)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2008-03-10 02:08:11 UTC (rev 8947)
@@ -102,6 +102,7 @@
__PACKAGE__->register_method(
method => "record_id_to_mods_slim",
+ authoritative => 1,
api_name => "open-ils.search.biblio.record.mods_slim.retrieve",
argc => 1,
note => "Provide ID, we provide the mods"
@@ -130,6 +131,7 @@
__PACKAGE__->register_method(
method => "record_id_to_copy_count",
+ authoritative => 1,
api_name => "open-ils.search.biblio.record.copy_count.staff",
);
@@ -234,6 +236,7 @@
__PACKAGE__->register_method(
method => "fleshed_copy_retrieve_batch",
+ authoritative => 1,
api_name => "open-ils.search.asset.copy.fleshed.batch.retrieve");
sub fleshed_copy_retrieve_batch {
@@ -1323,6 +1326,7 @@
__PACKAGE__->register_method(
method => "fetch_cn",
+ authoritative => 1,
api_name => "open-ils.search.callnumber.retrieve",
notes => "retrieves a callnumber based on ID",
);
More information about the open-ils-commits
mailing list