VLF-ONE Get Users defined in Users & Authorities

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

VLF-ONE Get Users defined in Users & Authorities

Post by jyoung »

Most of our VLF-ONE user authorities are mapped from an IBM i Group Profile.

When a user logs in, we get their group profile, for example "GROUPCR", then map that profile to a User in VLF-ONE "CREDIT_USR".
This has been working pretty well.

Now I am being asked to allow a certain subset of people access to a very specific command. I cannot put them in another group in the IBM i.

My thought then was to add them manually to the Users & Authorities using the same Username as they have on the IBM i.
When they log in, I can check their group profile from the IBM i and I can also see if they are one of the "special" users that have been added manually to VLF-ONE. If that is the case, then I can set their profile accordingly.

My question then, is how can I get access to the users in VLF-ONE?

I want to lookup a user by their user name.

Joe
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE Get Users defined in Users & Authorities

Post by MarkD »

There is a VLF feature called Custom Properties that can be used to extend the VLF authority model.
It might be worth checking it out for fit here https://docs.lansa.com/14/en/lansa048/i ... 8_0670.htm

Otherwise, user details are kept in table VFPPF06.

A method something like this should be able to locate a user:

Code: Select all

Mthroutine Name(LocateUserbyName)
Define_Map For(*INPUT) Class(#vf_eluset) Name(#UserPropertyset)
Define_Map For(*INPUT) Class(#VF_ELUSRL) Name(#UserProfileLong)
Define_Map For(*OUTPUT) Class(#vf_elidn) Name(#InternalUserIdentifier)
Define_Map For(*RESULT) Class(#prim_boln) Name(#Found)
Fetch Fields(#VF_ELIDN) From_File(VFPLF06A) With_Key(#UserPropertyset #UserProfileLong)
If_Status Is(*OKAY)
#Found := True
#InternalUserIdentifier := #vf_elidn
Endif
Endroutine
The user property set you defined for your framework can be found here https://docs.lansa.com/14/en/lansa048/c ... lf1935.htm
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: VLF-ONE Get Users defined in Users & Authorities

Post by jyoung »

Thanks Mark,

The lookup from VFPLF06A was what I needed to extend our security model.

Joe
Post Reply