2024-10-05 16:22:40 +02:00
|
|
|
def read_page(request, rel_path):
|
2024-10-07 22:01:01 +02:00
|
|
|
return "private" not in rel_path or write_page(request, rel_path)
|
2024-10-05 11:55:55 +02:00
|
|
|
|
|
|
|
|
2024-10-05 16:22:40 +02:00
|
|
|
def write_page(request, rel_path):
|
|
|
|
return request.user.is_authenticated and request.user.username in ['root', 'dirk']
|
|
|
|
|
|
|
|
|
|
|
|
def read_attachment(request, rel_path):
|
2024-10-08 15:00:14 +02:00
|
|
|
# /!\ rel_path is the filsystem rel_path - caused by the flat folder structure /!\
|
2024-10-07 00:44:22 +02:00
|
|
|
return True
|
2024-10-05 16:22:40 +02:00
|
|
|
|
|
|
|
|
2024-10-05 11:55:55 +02:00
|
|
|
def modify_attachment(request, rel_path):
|
2024-10-08 15:00:14 +02:00
|
|
|
# /!\ rel_path is the filsystem rel_path - caused by the flat folder structure /!\
|
2024-10-07 00:44:22 +02:00
|
|
|
return request.user.is_authenticated and request.user.username in ['root', 'dirk']
|