You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.4 KiB

  1. #
  2. # Authentication login is matched against the "user" key, and collection's path is matched against the "collection" key.
  3. # You can use Python's ConfigParser interpolation values %(login)s and %(path)s.
  4. # You can also get groups from the user regex in the collection with {0}, {1}, etc.
  5. #
  6. # For example, for the "user" key, ".+" means "authenticated user" and ".*" means "anybody" (including anonymous users).
  7. #
  8. # Section names are only used for naming the rule.
  9. # Leading or ending slashes are trimmed from collection's path.
  10. #
  11. # This means all users starting with "admin" may read any collection
  12. [admin]
  13. user: ^admin.*$
  14. collection: .*
  15. permission: r
  16. # This means all users may read and write any collection starting with public.
  17. # We do so by just not testing against the user string.
  18. [public]
  19. user: .*
  20. collection: ^public(/.+)?$
  21. permission: rw
  22. # A little more complex: give read access to users from a domain for all
  23. # collections of all the users (ie. user@domain.tld can read domain/\*).
  24. [domain-wide-access]
  25. user: ^.+@(.+)\..+$
  26. collection: ^{0}/.+$
  27. permission: r
  28. # Allow authenticated user to read all collections
  29. [allow-everyone-read]
  30. user: .+
  31. collection: .*
  32. permission: r
  33. # Give write access to owners
  34. [owner-write]
  35. user: .+
  36. collection: ^%(login)s(/.+)?$
  37. permission: rw
  38. # Allow CardDavMATE-, CalDavZAP- or InfCloud- WEBclient to work
  39. # anonymous users have read access to "/" but no files or subdir
  40. [infcloud]
  41. user: .*
  42. collection: /
  43. permission: r