We need to add user permissions control depending on user profile to our application. After authentication, we add the user profile to the session context (ILookupContext) and each adapter uses this profile to build the page according the profile.
The problem appears when we need to end the session on user logout. When user clicks the logout button, we clean the user information from the session context and we redirect to the Login page:
Within this method I want to finish the session and destroy all the adapters. Searching the documentation I’ve found these possibilities
this.markThisSubsessionForDestroy();
endProcess()
destroy()
But none of them works.
How can I finish the session? In other words, how can I destroy all the adapters so that the user could change the profile at the Login page and enter into the application with new adapters and not see previous results?
I can not find the method:
getUserSession().getRegisteredGUISessions(); (none of them)
After this call, the object workplace is null:
IMFWorkplace workplace = (IMFWorkplace)mContext.lookup(IMFWorkplace.IWORKPLACE_LOOKUP, false);
We do not use Multi Frame Workplace layouts, we use HTML pages.
a very simple way to force the server side session to be removed is to load a plain html document (ie a non framework page) into a frame with ONUNLOADBEHAVIOR==REMOVESESSION. Example: with the given frameset definition…
…in any page adapter to remove the server side session. Typically you want to provide for the possibility to re-logon. For that just place a button into “goodby.html” that starts the frameset again…