[open-ils-commits] r8143 -
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Dec 5 13:02:25 EST 2007
Author: erickson
Date: 2007-12-05 12:42:46 -0500 (Wed, 05 Dec 2007)
New Revision: 8143
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm
Log:
moved calls to cstore. moved events to die_events for in-transaction errors
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm 2007-12-05 17:42:42 UTC (rev 8142)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/UserGroups.pm 2007-12-05 17:42:46 UTC (rev 8143)
@@ -2,7 +2,7 @@
use base 'OpenSRF::Application';
use strict; use warnings;
use OpenILS::Application::AppUtils;
-use OpenILS::Utils::Editor q/:funcs/;
+use OpenILS::Utils::CStoreEditor q/:funcs/;
use OpenSRF::Utils::Logger q/$logger/;
use OpenSRF::EX qw(:try);
my $U = "OpenILS::Application::AppUtils";
@@ -97,10 +97,10 @@
my( $self, $conn, $auth, $userid, $leader ) = @_;
my $e = new_editor(authtoken=>$auth, xact=>1);
- return $e->event unless $e->checkauth;
- return $e->event unless $e->allowed('UPDATE_USER'); # XXX reley on editor perm
+ return $e->die_event unless $e->checkauth;
+ return $e->die_event unless $e->allowed('UPDATE_USER'); # XXX reley on editor perm
- my $user = $e->retrieve_actor_user($userid) or return $e->event;
+ my $user = $e->retrieve_actor_user($userid) or return $e->die_event;
# ask for a new group id
my $groupid = $e->request('open-ils.storage.actor.user.group_id.new');
@@ -108,7 +108,7 @@
$user->usrgroup($groupid);
$user->master_account('t') if $leader;
- $e->update_actor_user($user) or return $e->event;
+ $e->update_actor_user($user) or return $e->die_event;
$e->commit;
return $groupid;
}
More information about the open-ils-commits
mailing list