Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 To: M. Akram Bhatti
  Where is M. Akram Bhatti?
 Riyadh
 Saudi Arabia
 M. Akram Bhatti
 Tags
Subject: RE: Open mode based on user's rights
Thread ID: 228443 Message ID: 228529 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Security and Application Protection
Date: Tuesday, May 19, 2009 9:09:19 PM         
   


> > Colleagues,
> >
> > what can I use to open a file (say, XLS or DOC) in Read-Only mode? The matter is that, sometimes, depending on the user's access level, I need to allow an end user to only view DOC or XLS file, but not modify it.
> >
> > NavigateTo() has no such parameter as lReadWrite flag, neither does ShellExecute().
> >
> > Neither can I change the file's access' attribute on the run (our end users are of Restricted type).
> >
> > Any ideas/solutions are welcome.
> >
> > TIA!
> >
> > Regards,
> >
> > Ilya
>
> Hi Rabyy,
>
> You can check the permissions for the user, if he/she has readonly rights, then
> copy XLS/DOC file to a different name using Sys(2015) and using automation commands, set new file protected for modification (or even he/she modifies, changes will not be save to original file). If the user has permission to modify, simply open the original file for him.
>
> Regards,
> Akram

It's very interesting idea, colleague Bhatti, thanks!

Regards,

Ilya

ENTIRE THREAD

Open mode based on user's rights Posted by Ilya Rabyy @ 5/19/2009 12:45:56 AM
RE: Open mode based on user's rights Posted by M. Akram Bhatti @ 5/19/2009 7:00:18 AM
RE: Open mode based on user's rights Posted by Ilya Rabyy @ 5/19/2009 9:09:19 PM
RE: Open mode based on user's rights Posted by Christian Tabligan @ 5/20/2009 4:18:16 AM