when using the force-reload option to reset timeout, propagate the ws_ou and wsid...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 1 Mar 2011 18:09:57 +0000 (18:09 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 1 Mar 2011 18:09:57 +0000 (18:09 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19551 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/c-apps/oils_auth.c

index 4e7b20b..962977a 100644 (file)
@@ -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;