From aabebb557854617a062789c2f7cc95e299fe2fab Mon Sep 17 00:00:00 2001 From: Julien Miotte Date: Tue, 8 Apr 2014 23:57:47 +0200 Subject: [PATCH] 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. --- config | 2 +- radicale/rights/regex.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config b/config index ace677b..b9df376 100644 --- a/config +++ b/config @@ -104,7 +104,7 @@ committer = Radicale [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 diff --git a/radicale/rights/regex.py b/radicale/rights/regex.py index 21a828b..afed10c 100644 --- a/radicale/rights/regex.py +++ b/radicale/rights/regex.py @@ -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):