Piki is a minimal wiki
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

access.py 647B

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