Piki is a minimal wiki
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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