[open-ils-commits] r10488 - trunk/Open-ILS/src/perlmods/OpenILS/Application

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Aug 30 11:42:26 EDT 2008


Author: erickson
Date: 2008-08-30 11:42:23 -0400 (Sat, 30 Aug 2008)
New Revision: 10488

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm
Log:
on perm failure, return failure event to caller instead of throwing exception

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm	2008-08-30 14:31:48 UTC (rev 10487)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/PermaCrud.pm	2008-08-30 15:42:23 UTC (rev 10488)
@@ -19,6 +19,7 @@
 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 @@
         }
 
         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}",
             );
         }
     }



More information about the open-ils-commits mailing list