mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Adding a new "authenticated" ACL type.
When set, all authenticated users will have rw permissions on all collections, but no anonymous user will be able to read or write any collection.
This commit is contained in:
parent
d053257643
commit
aabebb5578
2 changed files with 4 additions and 2 deletions
2
config
2
config
|
@ -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
|
||||
|
|
|
@ -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, permission):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue