Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preventing Users from Directory Browsing

Status
Not open for further replies.

volfreak

Programmer
Nov 6, 2000
42
0
0
US
When we present our users with a GetFile() dialog, they have the ability to browse directories on the server. We would like to be able to limit which users have access to which directories based upon information in our database.

Is there a way to limit which directories/folders that users can access in the GetFile() function or other similar function? We'd like to do it without having to manage privileges for each directory on the server (within the one directory that all users will have access to).

thanks,
 
If I'm not mistaken, GetFile() simply calls a WinAPI function. There is no way to limit what directories it can browse through for VFP. The best suggestion I can make is to validate the path using the JUSTPATH() function AFTER the GetFile() function has finished. If the user tried to open a file in a restricted path, don't allow the program to proceed.

Ian
 
Yeah, that's what I thought of but the problem comes in that they can actually copy/access files through the getfile() dialog.

May have to roll our own in some way.

Thanks,
 
Yeah. The only way to stop that is to implement the restrictions at the OS/Fileserver level. Sorry.

Ian
 
Do you know if using LDAP would allow me to set the Users and Groups and access those settings from VFP?

Thanks for the replies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top