piki/pages/access.py

17 lines
385 B
Python
Raw Normal View History

# TODO: Implement access control for pages
2024-10-05 16:22:40 +02:00
def read_page(request, rel_path):
return True
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):
return read_page(request, rel_path)
def modify_attachment(request, rel_path):
2024-10-05 16:22:40 +02:00
return write_page(request, rel_path)