LP#1339118: Ignore permission checks for "jump" context
authorMike Rylander <mrylander@gmail.com>
Tue, 8 Jul 2014 15:11:54 +0000 (11:11 -0400)
committerBen Shum <bshum@biblio.org>
Thu, 24 Jul 2014 16:44:19 +0000 (12:44 -0400)
We don't worry about checking permissions on foreign objects when we're
simply using them to get a context OU for the local object permission
testing.  The "jump" field just gives us more layers of indirection, and
shouldn't cause a perm check, just like normal foreign context OUs.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/c-apps/oils_sql.c

index 6d3d25c..77cb12c 100644 (file)
@@ -1772,8 +1772,10 @@ static int verifyObjectPCRUD ( osrfMethodContext* ctx, osrfHash *class, const js
                                                        _tmp_params = single_hash( foreign_pkey, foreign_pkey_value );
 
                                                        // Do the lookup
+                                                       osrfHashSet((osrfHash*) ctx->session->userData, "1", "inside_verify");
                                                        _list = doFieldmapperSearch( ctx, foreign_class_meta,
                                                                        _tmp_params, NULL, &err );
+                                                       osrfHashSet((osrfHash*) ctx->session->userData, "0", "inside_verify");
 
                                                        // Get the resulting row
                                                        jsonObjectFree( _fparam );