mirror of
https://github.com/Kozea/Radicale.git
synced 2025-07-23 17:48:30 +00:00
Allow read-only access to .well-known/ca(l|rd)av (related to #32)
This commit is contained in:
parent
fe1cd1d44d
commit
ce8e86af63
1 changed files with 6 additions and 2 deletions
|
@ -95,6 +95,10 @@ def authorized(user, collection, right):
|
|||
|
||||
If the user is empty it checks for anonymous rights
|
||||
"""
|
||||
collection_url = collection.url.rstrip("/") or "/"
|
||||
if collection_url in (".well-known/carddav", ".well-known/caldav"):
|
||||
return right == "r"
|
||||
rights_type = config.get("rights", "type").lower()
|
||||
return rights_type == "none" or (_read_from_sections(
|
||||
user or "", collection.url.rstrip("/") or "/", right))
|
||||
return (
|
||||
rights_type == "none" or
|
||||
_read_from_sections(user or "", collection_url, right))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue