DEFINE INPUT PARAMETER pcPassword AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER pcUserId AS CHARACTER NO-UNDO. /* Authenticate user - if the user/password does not exist an error condition will automatically be raised. */ FIND FIRST app_user WHERE app_user.user_id = pcUserId AND app_user.password = ENCODE(pcPassword) NO-LOCK. /* Authorize access to particular procedures */ IF NOT SESSION:EXPORT(app_user.can_run) THEN DO: /* Log failure message to AppServer agent logfile and refuse connection */ MESSAGE "Failed to create export list for" app_user.user_id. RETURN ERROR. END. |