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
config
2
config
@ -104,7 +104,7 @@ committer = Radicale <radicale@example.com>
|
|||||||
|
|
||||||
[rights]
|
[rights]
|
||||||
# Rights backend
|
# Rights backend
|
||||||
# Value: None | owner_only | owner_write | from_file | custom
|
# Value: None | authenticated | owner_only | owner_write | from_file | custom
|
||||||
type = None
|
type = None
|
||||||
|
|
||||||
# Custom rights handler
|
# Custom rights handler
|
||||||
|
@ -52,9 +52,11 @@ except ImportError:
|
|||||||
|
|
||||||
|
|
||||||
DEFINED_RIGHTS = {
|
DEFINED_RIGHTS = {
|
||||||
|
"authenticated": "[rw]\nuser:.*\ncollection:.*\npermission:rw",
|
||||||
"owner_write": "[r]\nuser:.*\ncollection:.*\npermission:r\n"
|
"owner_write": "[r]\nuser:.*\ncollection:.*\npermission:r\n"
|
||||||
"[w]\nuser:.*\ncollection:^%(login)s/.+$\npermission:w",
|
"[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):
|
def _read_from_sections(user, collection, permission):
|
||||||
|
Loading…
Reference in New Issue
Block a user