Kbase P81409: How to use user name and password to access the workshop to protect from unauthorized user?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/06/2009 |
|
Status: Verified
GOAL:
How to use user name and password to access the workshop to protect from unauthorized user?
FACT(s) (Environment):
WebSpeed 3.1x
OpenEdge 10.x
All Supported Operating Systems
FIX:
In order to secure the page you need to modify the web-disp.p file.
Need to code something similar to the following.
/******************************************************************************/
IF appProgram = "workshop" THEN DO:
IF get-field( 'user' ) = '' THEN DO:
/* no user name in URL */
END.
ELSE DO:
IF get-field('user') = 'john' OR
get-field('user') = 'dow' THEN
RUN run-web-object IN web-utilities-hdl (AppProgram)
NO-ERROR.
ELSE dynamic-function( 'queue-message', ?, "You are not authorized!" ).
END.
END.
ELSE
RUN run-web-object IN web-utilities-hdl (AppProgram) NO-ERROR.
/******************************************************************************/
In 3.1D the above code needs to be placed under the following section:
/******************************************************************************/
AppProgram = (IF AppProgram = "debug":U THEN "webutil/debug.p":U ELSE
(IF AppProgram = "ping":U THEN "webutil/ping.p":U ELSE
(IF AppProgram = "reset":U THEN "webutil/reset.p":U ELSE
AppProgram))).
/******************************************************************************/
The URL to access the workshop should be as follows:
http://<web_server_name>/scripts/cgiip.exe/WService=wsbroker1/workshop?user=john