Re: Ponder: ERCoreBL User Sessions Stage Manager Actors ?
Ramsey Gurley <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
On Dec 21, 2012, at 6:59 PM, James Cicenia wrote: > Time to dive into understanding your threadstorage bits... > > I display a list of users as admin. > I want to run my app as the user. > To do this I wanted to swap out the session user with the user they picked. > > I thought something like this: > > ERCoreBL.setActor(eo); > > But that doesn't seem to change my session user in: > > user = (User) ERStageManager.USER.valueInObject(ERXSession.session().objectStore()); > > or > > ERStageManager.INSTANCE.setActor(eo); That should work. If you look at the code for that method, all it does is: ERCoreBL.setActor(actor); ERXWOContext.currentContext().session(); USER.takeValueInObject(actor, ERXSession.session().objectStore()); So if you call that and then turn around and say user = (User)ERStageManager.USER.valueInObject(ERXSession.session().objectStore()); and get the wrong answer, then something is pretty messed up. > > That doesn't seem to work either. > > Basically how do I swap user in the session. > > Thanks > James ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Wonder-disc mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wonder-disc