Piki is a minimal wiki
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

access.py 591B

12345678910111213141516
  1. def read_page(request, rel_path):
  2. return "private" not in rel_path or write_page(request, rel_path)
  3. def write_page(request, rel_path):
  4. return request.user.is_authenticated and request.user.username in ['root', 'dirk']
  5. def read_attachment(request, rel_path):
  6. # /!\ rel_path is the filsystem rel_path - caused by the flat folder structure /!\
  7. return True
  8. def modify_attachment(request, rel_path):
  9. # /!\ rel_path is the filsystem rel_path - caused by the flat folder structure /!\
  10. return request.user.is_authenticated and request.user.username in ['root', 'dirk']