Focal Point
[SOLVED] &IBIMR_user Available in Maintain?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/72310862

March 02, 2009, 03:20 PM
John_Edwards
[SOLVED] &IBIMR_user Available in Maintain?
Is there a function call or other method to capture the MR Userid in Maintain? I'd like to avoid passing it in for the obvious reasons.

J.

This message has been edited. Last edited by: John_Edwards,



March 02, 2009, 03:59 PM
Waz
How are you using maintain, is it form based ?

You can add it to the maintain cookie, and this will be passed to maintain, were it can be retrieved.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

March 02, 2009, 04:50 PM
John_Edwards
That's exactly what I'm trying to avoid. In theory someone could forge the call, though in reality the chances of that in this current situation are just this side of absolute zero.

J.



March 02, 2009, 05:07 PM
Waz
Its difficult to make suggestions not knowing what your set up is.

You could call WF pick up the MR User, then call Maintain, all depends on what you are doing.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

March 02, 2009, 05:26 PM
John_Edwards
My goal is to retrieve the MRE userid in Maintain so that it will be more difficult to forge. Passing it in the url or in the cookie on the MNTCON call is a bit of a gap in security. If the running Maintain could retrieve it once running . . . harder to fake the value in the database records.

Given the scope of the application this likely would never be an issue, but I'd like to close the discussion before it opens.

J.



March 02, 2009, 06:06 PM
Waz
This sounds like you want to create your own session information.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

March 02, 2009, 07:36 PM
John_Edwards
I'd really just like to be able to request the MR User ID from Maintain. If the answer is no then that's fine. I can get it from WF so it's available. I just don't know if Maintain can get it.

J.



March 02, 2009, 11:55 PM
Dave Ayers
You could EXEC a focexec and grab the value of &IBIMR_user, and pass it back to your maintain. But since the focexec is running in a different agent, I'm not sure if you'll get the correct value.


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
March 03, 2009, 08:53 AM
John_Edwards
Wow -- my wingman JL Chang just brought that same idea to my attention right now. Execute a focexec where the &IBIMR_user is embedded into a DEFINE field. This allows the Maintain file calling it to establish the userid completely separately from the parameters sent by the unit that is calling it. It also ensures that the MR session is still up and running.

NOT Working. Jeeze. Why is this so damn hard?

J.

This message has been edited. Last edited by: John_Edwards,



March 03, 2009, 02:51 PM
Waz
Using EXEC will not work, as it just executes another agent session. It would have to be a Web call to have a chance at getting the MR User.

Because you do not want to pass the MR User to maintain, I can only suggest one option.

If you can pass the MRE session id during the login to MRE, and store it with the MR User, you may be able to send the MRE session id to maintain, then retrieve the ID.

All you are passing is a value that will expire.

Just not sure how to get the id.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

March 04, 2009, 02:31 AM
GamP
Just trying to add to the confusion ...
Isn't the MRE Userid just an HTTP variable?
If so, then I think you might be able to use a maintain function to retrieve this variable from the http environment. Just can't seem to recall what the function is named...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 04, 2009, 10:10 AM
John_Edwards
I think this just worked -->

compute Current_Userid/A30 = IWC.GetAppCgiValue("IBIMR_user");

I need to test a bit more, but if this is the case I need to take myself out back for a beating for not trying the easiest thing first.

J.



March 04, 2009, 02:56 PM
Waz
If you can get it from AppCgiValue, isn't it in a form var ??


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

March 05, 2009, 08:10 AM
Alan B
Waz

What I recently discovered was that IWC.GetAppCgiValue will collect cookie values from WF_USER. These are values held in the WF_USER cookie and not passed in the form or URL calling the Maintain.

John, don't beat yourself. This is not a documented ability.


Alan.
WF 7.705/8.007
March 05, 2009, 01:40 PM
GamP
Yes Alan, you're right. If it was a non-cookie variable, you could just as easily have used the gethtmlfield function to retrieve the value. But that will not return the value, since it is not a 'normal' html variable, but a cookie one.

quote:
I need to take myself out back for a beating
ROFL!


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988