[open-ils-commits] r13379 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jun 12 14:13:01 EDT 2009
Author: erickson
Date: 2009-06-12 14:12:57 -0400 (Fri, 12 Jun 2009)
New Revision: 13379
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Log:
disallow merge if subordinate account is in collections
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-06-12 14:02:10 UTC (rev 13378)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-06-12 18:12:57 UTC (rev 13379)
@@ -3053,6 +3053,10 @@
my $e = new_editor(xact => 1, authtoken => $auth);
return $e->die_event unless $e->checkauth;
+ # disallow the merge if any subordinate accounts are in collections
+ my $colls = $e->search_money_collections_tracker({usr => $user_ids}, {idlist => 1});
+ return OpenILS::Event->new('MERGED_USER_IN_COLLECTIONS', payload => $user_ids) if @$colls;
+
my $master_user = $e->retrieve_actor_user($master_id) or return $e->die_event;
my $del_addrs = ($U->ou_ancestor_setting_value(
$master_user->home_ou, 'circ.user_merge.delete_addresses', $e)) ? 't' : 'f';
More information about the open-ils-commits
mailing list