|
An easy way is to try an open of the file on the IFS (using the API) and monitor for the error condition (using another IFS API). If the user does not have authority, there is a specific error message generated. If you do open the file to check for the authority, you can then just close the file (close API). The IFS API's are a bit different from the "standard" 400 API's. They are easy once you get the hang of them... Mike ----- Original Message ----- From: "Gordon R. Robinson IV" <GRobinson@ruger.com> To: <RPG400-L@midrange.com> Sent: Wednesday, March 28, 2001 11:02 AM Subject: Checking User's Authority to Files in Root File System > Does anyone know a way, particularly an API, to check if a user has > authority to a file? I found an API to check the user's authority to an > object in the QSYS.LIB file system, but I need to be able to check the > user's authority to a file in the Root file system. I'm writing a program > that will only show certain options if the users has access the authority to > use those files. > > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.