radicale: Use rights file by default for radicale 2.x

The default rights file shipped in radicale 2.x package is equivalent
to owner_only. By setting this as our default, we can avoid any change
to the default config.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy authored and Sunil Mohan Adapa committed 2019-01-26 22:06:49 -08:00
1 parent bb29e0932e
commit 24f1967b6a
2 files changed
+17 -3

No files matched your search

+7
View File
@@ -177,6 +177,13 @@ def get_rights_value():
"""Returns the current Rights value."""
aug = load_augeas()
value = aug.get('/files' + CONFIG_FILE + '/rights/type')
current_version = get_package_version()
if current_version and current_version >= VERSION_2:
if value == 'from_file':
# Radicale 2.x default rights file is equivalent to owner_only.
value = 'owner_only'
return value