These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

restrict folder deletion and dynamic root folder

1) How i can set WebExplorer base folder dynamically?
 
    For example my folder is: 
    
    "C:\" & Session("username")
 
2) I have a folder structure like this:
 
    
    "C:\" & Session("username")
 
    now  i have some primary folder like 0001, 0002, 0003 etc...
   each of this folder has other subfolder
  example: "C:\" & Session("username") & "\0001\xxx"
 
    I don't wanna that users can delete primary folder
   (0001) but he can delete only the xxx folder.
 
Luca Pellegrino 5/8/2003 8:38 AM
Hi Luca,
You should first declare accessList (inc_config.asp) as a variable instead of a constant, so change
"Const accessList" to "Dim accessList". 

Then you can set the access list dynamically as follows:
accessList = "C:\" & Session("username") & "\0001" & ";" &
                    "C:\" & Session("username") & "\0002" & ";" &
                    "C:\" & Session("username") & "\0003"

This way, you will have three root folders and this will prevent users from being able to delete primary folders (0001, 0002, 0003 etc)
Beware that inc_config.asp is overwritten every time you apply the preferences (prefs.asp), so
you would need to move this code to inc_public.asp instead.
Cem Alacayir 5/11/2003 12:25 PM