Piki is a minimal wiki
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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