From a34229be5b0adc2afcd3d5d5a794054c58151e22 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 3 Mar 2011 16:04:08 +0000 Subject: [PATCH] when using the force-reload option to reset timeout, propagate the ws_ou and wsid values from the cached user object into the reloaded user object git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_1@19570 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/c-apps/oils_auth.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Open-ILS/src/c-apps/oils_auth.c b/Open-ILS/src/c-apps/oils_auth.c index 4e7b20b11e..962977abab 100644 --- a/Open-ILS/src/c-apps/oils_auth.c +++ b/Open-ILS/src/c-apps/oils_auth.c @@ -719,6 +719,12 @@ static int _oilsAuthReloadUser(jsonObject* cacheObj) { osrfAppSessionFree(session); // calls disconnect internally if(newUserObj) { + + // ws_ou and wsid are ephemeral and need to be manually propagated + // oilsFMSetString dupe()'s internally, no need to clone the string + oilsFMSetString(newUserObj, "wsid", oilsFMGetStringConst(userObj, "wsid")); + oilsFMSetString(newUserObj, "ws_ou", oilsFMGetStringConst(userObj, "ws_ou")); + jsonObjectRemoveKey(cacheObj, "userobj"); // this also frees the old user object jsonObjectSetKey(cacheObj, "userobj", newUserObj); return 1; -- 2.11.0