From ab33f44b21e764f133d3f72a712bc77c91002aec Mon Sep 17 00:00:00 2001 From: erickson Date: Sat, 30 Aug 2008 15:42:23 +0000 Subject: [PATCH] on perm failure, return failure event to caller instead of throwing exception git-svn-id: svn://svn.open-ils.org/ILS/trunk@10488 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm b/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm index 5011d9e91e..e24565c092 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm @@ -19,6 +19,7 @@ use OpenILS::Utils::CStoreEditor qw/:funcs/; use XML::LibXML; use XML::LibXML::XPathContext; use XML::LibXSLT; +use OpenILS::Event; our %namespace_map = ( oils_persist=> {ns => 'http://open-ils.org/spec/opensrf/IDL/persistence/v1'}, @@ -174,9 +175,10 @@ sub CRUD_action_object_permcheck { } if ((lc($all_perms) eq 'true' && @perms != $pok) or !$pok) { - throw OpenSRF::DomainObject::oilsException->new( - statusCode => 403, - status => "Perm failure -- action: $self->{action}, object type: $self->{json_hint}", + return OpenILS::Event->new('PERM_FAILURE', + ilsperm => "", # XXX add logic to report which perm failed + ilspermloc => "", + payload => "Perm failure -- action: $self->{action}, object type: $self->{json_hint}", ); } } -- 2.43.2