Minor bugfix to determining if an idle session is still valid

This commit is contained in:
Infineon\Ouellette 2025-01-17 14:57:36 -07:00 committed by Ouellette Jonathan (CSC FI SPS MESLEO)
parent 0a8451fa14
commit a269f2f6cf

View File

@ -217,16 +217,12 @@ end service
This routine validates a users session without extending it. Used for OI Wizard sessions that are awaiting input. This routine validates a users session without extending it. Used for OI Wizard sessions that are awaiting input.
*/ */
Service ValidateSessionIdle(OIWizardID) Service ValidateSessionIdle(OIWizardID)
ErrorMsg = '' ErrorMsg = ''
If OIWizardID NE '' then If OIWizardID NE '' then
OIWizardRec = Database_Services('ReadDataRow', 'OI_WIZARD', OIWizardID, True$, 0, False$) Valid = Xlate('OI_WIZARD', OIWizardID, 'VALID', 'X')
If Error_Services('NoError') then If Not(Valid) then
SessionTerminated = OIWizardRec<OI_WIZARD.TERMINATED$> ErrorMsg = 'Invalid or expired session'
If SessionTerminated then
ErrorMsg = 'Expired session.'
end
end else
ErrorMsg = Error_Services('GetMessage')
end end
end else end else
ErrorMsg = 'Error in ':Service:' service. Null OIWizardID passed in.' ErrorMsg = 'Error in ':Service:' service. Null OIWizardID passed in.'
@ -235,6 +231,7 @@ Service ValidateSessionIdle(OIWizardID)
If ErrorMsg EQ '' then If ErrorMsg EQ '' then
Response = True$ Response = True$
end else end else
debug
Error_Services('Add', ErrorMsg) Error_Services('Add', ErrorMsg)
Response = False$ Response = False$
end end