Piki is a minimal wiki
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

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']