Merge pull request #142 from mike-perdide/authenticated_feature

Adding a new "authenticated" ACL type.
This commit is contained in:
Guillaume Ayoub 2014-04-15 16:48:19 +02:00
commit 3e893a3420
2 changed files with 4 additions and 2 deletions

2
config
View File

@ -104,7 +104,7 @@ committer = Radicale <radicale@example.com>
[rights]
# Rights backend
# Value: None | owner_only | owner_write | from_file | custom
# Value: None | authenticated | owner_only | owner_write | from_file | custom
type = None
# Custom rights handler

View File

@ -52,9 +52,11 @@ except ImportError:
DEFINED_RIGHTS = {
"authenticated": "[rw]\nuser:.*\ncollection:.*\npermission:rw",
"owner_write": "[r]\nuser:.*\ncollection:.*\npermission:r\n"
"[w]\nuser:.*\ncollection:^%(login)s/.+$\npermission:w",
"owner_only": "[rw]\nuser:.*\ncollection:^%(login)s/.+$\npermission:rw"}
"owner_only": "[rw]\nuser:.*\ncollection:^%(login)s/.+$\npermission:rw",
}
def _read_from_sections(user, collection_url, permission):