Library List management call RPG Programs [message #902901] |
Tue, 21 August 2012 00:37  |
Eclipse User |
|
|
|
I've figured out how to call an RPG program using the @IBMiProgram. Works fine when not accessing files. But, when trying to access a file, it is not finding the file. This is because the job library list for QUSER does not contain the needed library.
I could set the proper library list for QUSER. But, I have multiple users that need different library lists and cannot default everything to QUSER. As well, we need to track who is on the system and adding/changing/deleting records.
Is there a way to set sign on (user ID/Password) for different users from EGL so that the correct library lists are used and the true users are identified?
Thanks
Bob
|
|
|
|
|
Re: Library List management call RPG Programs [message #903270 is a reply to message #903108] |
Wed, 22 August 2012 15:16  |
Eclipse User |
|
|
|
"But, I'm thinking that I may have to pass in the user id and password and verify them on program start and then set the library list based on user id."
You are on the right track (IMHO) to be thinking in terms of decoupling authentication from authorization. A front-end login check of credentials allows (or prevents) access to your application for a given user. Once in the application, a swap profile when you make a program call establishes the runtime environment and then object-level authorization is enforced by the server.
Based on the link you gave, you are on the right track with swapping profiles using the profile handle API's. Keep in mind that you'll go through a "super user" profile to swap profiles to the actual logged-in user's profile (that's the way I do it anyway). If I remember correctly, the super user profile must have access to the user profile it is swapping to (or *ALLOBJ authority).
--Dan
|
|
|
Powered by
FUDForum. Page generated in 0.27317 seconds