| |
| /pliant/browse/virtual_tree.page |
| |
| 1 |
module "/pliant/appli/file_browser.pli" | |
| 2 |
module "/pliant/appli/data_browser.pli" | |
| 3 |
module "/pliant/appli/type_browser.pli" | |
| 4 |
module "/pliant/appli/mail.pli" | |
| 5 |
module "/pliant/appli/forum.pli" | |
| 6 |
| |
| 7 |
if (virtual_path parse "/file/" any:(var Str path)) and allowed:"browse_file" | |
| 8 |
# Pliant files | |
| 9 |
file_browser "/"+path options allowed:"administrator" "/"+path | |
| 10 |
eif (virtual_path parse "/system_file/" any:(var Str path)) and allowed:"browse_system_file" | |
| 11 |
# system files | |
| 12 |
if allowed:"administrator" | |
| 13 |
void | |
| 14 |
eif (path parse "dev/" any) or (path parse "proc/" any) | |
| 15 |
[You are now allowed to browse this file.] | |
| 16 |
return | |
| 17 |
eif path:len=0 or (path path:len-1)="/" | |
| 18 |
void | |
| 19 |
eif (path parse "bin/" any) | |
| 20 |
void | |
| 21 |
eif (path parse "boot/" any) | |
| 22 |
void | |
| 23 |
eif (path parse "lib/" any) | |
| 24 |
void | |
| 25 |
eif (path parse "pliant/" any) | |
| 26 |
void | |
| 27 |
eif (path parse "pliant_security/" any) and (path search "_secret." -1)=(-1) and (path search "2." -1)=(-1) | |
| 28 |
void | |
| 29 |
else | |
| 30 |
[You are now allowed to browse this file.] | |
| 31 |
return | |
| 32 |
file_browser "file:/"+path options allowed:"administrator" "" | |
| 33 |
eif (virtual_path parse "/data" any:(var Str path)) and allowed:"browse_data" | |
| 34 |
# database datas | |
| 35 |
if allowed:"administrator" | |
| 36 |
void | |
| 37 |
eif path="" or path="/pliant" or (path parse "/pliant/" any) and not (path parse "/pliant/forum" any) | |
| 38 |
void | |
| 39 |
else | |
| 40 |
[You are now allowed to browse this part of the database.] | |
| 41 |
return | |
| 42 |
data_browser path options allowed:"administrator" | |
| 43 |
eif (virtual_path eparse "/type/" any:(var Str name)) and allowed:"browse_type" | |
| 44 |
type_browser name | |
| 45 |
eif (virtual_path parse "/mail" any:(var Str path)) and user_name<>"" | |
| 46 |
# mail | |
| 47 |
mail path options | |
| 48 |
eif (virtual_path parse "/forum/" any:(var Str path)) and allowed:"browse_patch" | |
| 49 |
# forum | |
| 50 |
forum "/"+path options | |
| 51 |
else | |
| 52 |
reset_http_answer | |
| |