Modifications to your version of UFU0001

Visual LANSA Framework

Modifications to your version of UFU0001

Scenario: System i Web Server

Assumptions

Settings

Enroll Typical Users in the Framework

Make a new version of UFU0001 that looks up the Framework user profile ("typical user") that typifies the user who has signed on to the HTTP server and switch to the typical user. (users who are not found can have a default typical user assigned to them).

The look up could be done using a database file of user profiles, or it could be done by calling  a CL program that accesses the user's System i group profile, on the basis that the Framework's "typical users" are the same as the System i group profiles.

in the RDML in your version of UFU0001

CALL PGM(GETGRPPRF) PARM(#CHK_USER #GRPPRF) EXIT_USED(*NEXT) MENU_USED(*NEXT)                                        

CHANGE #CHK_USER #GRPPRF

CHANGE #CHK_VALP 'FALSE'

 

CL program GETGRPPRF could be something like:

PGM        PARM(&USRPRF &GRPPRF)                                    

DCL &GRPPRF *CHAR 10                                                

DCL &USRPRF *CHAR 10                                                

             RTVUSRPRF  USRPRF(&USRPRF) GRPPRF(&GRPPRF)             

ENDPGM                                                              

 

You can also modify UFU0001 to display the user that they logged on as, rather than the "typical user" they have been changed to.

change #CHK_VUSER *WEBUSER 

 

Compile your version of UFU0001

To change the Framework to use your version of UFU0001, go to  (Framework) --> (Properties...) --> Web/RAMP Details tab. Specify your function name in the option IIP - User Sign on Function Name.