From: Jeff Godin Date: Tue, 29 May 2012 14:28:50 +0000 (-0400) Subject: Fix IDL and OU setting check for staged users X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1fe7b38dffbda42d6012df238a34907726d63b00;p=evergreen%2Ftadl.git Fix IDL and OU setting check for staged users The IDL had references to sequences that do not exist: staging.usr_stage_row_id_seq -- a typo, fixed In the case of staging.billing_address_stage_row_id_seq, the staging.billing_address_stage table is created with LIKE, and uses the sequence staging.mailing_address_stage_row_id_seq The OU setting check for the open-ils.actor.user.stage.create API call was not passing an org unit, and would always fail. We now pass the home_ou of the user being staged. At this point, the opac.allow_pending_user OU setting type must be manually created before its value can be set. Signed-off-by: Jeff Godin --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index f1bd9b9b27..b2a864c5a0 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -7399,7 +7399,7 @@ SELECT usr, - + @@ -7444,7 +7444,7 @@ SELECT usr, - + diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/Stage.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/Stage.pm index 0e65c12c25..7e9aaaa438 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/Stage.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/Stage.pm @@ -33,8 +33,8 @@ __PACKAGE__->register_method ( sub create_user_stage { my($self, $conn, $user, $mail_addr, $bill_addr, $statcats) = @_; # more? - return 0 unless $U->ou_ancestor_setting_value('opac.allow_pending_user'); return OpenILS::Event->new('BAD_PARAMS') unless $user; + return 0 unless $U->ou_ancestor_setting_value($user->home_ou, 'opac.allow_pending_user'); my $e = new_editor(xact => 1);