Maximo

 View Only
  • 1.  Call setClientHost() and setClientAddr() from UserInfo()

    Posted 18 days ago

    Hi,

    Anybody knows how to call setClientHost() and setClientAddr() methods from UserInfo()? In automation script I am trying to get userInfo and then calling these set methods but it says "mbo.getUserInfo().setClientHost is not a function". Any pointers on how to call these setter methods from userInfo()?



    ------------------------------
    Suhas Joshi
    Pune
    ------------------------------


  • 2.  RE: Call setClientHost() and setClientAddr() from UserInfo()

    Posted 17 days ago

    setClientHost() and setClientAddr() are not "public" methods from UserInfo class.

    You can use MXSession class for these methods.

    from psdi.util import MXSession
    session = MXSession.getSession()

    clientAddr = request.getHeader("X-Forwarded-For")

    session .setClientHost(clientAddr)

    session .setClientAddr(clientAddr)

    Regards,

    Srikanth Narala



    ------------------------------
    [Srikanth][Narala]
    [Maximo Specialist]
    [Melbourne]
    [Australia]
    ------------------------------