mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-10 18:40:53 +00:00
Ability to create predefined calendar or(and) addressbook for new user
This commit is contained in:
parent
7340ddc9d2
commit
f7e01d55ed
4 changed files with 60 additions and 2 deletions
|
@ -26,6 +26,7 @@ Use ``load()`` to obtain an instance of ``Configuration`` for use with
|
|||
"""
|
||||
|
||||
import contextlib
|
||||
import json
|
||||
import math
|
||||
import os
|
||||
import string
|
||||
|
@ -101,6 +102,12 @@ def _convert_to_bool(value: Any) -> bool:
|
|||
return RawConfigParser.BOOLEAN_STATES[value.lower()]
|
||||
|
||||
|
||||
def json_str(value: Any) -> dict:
|
||||
if not value:
|
||||
return {}
|
||||
return json.loads(value)
|
||||
|
||||
|
||||
INTERNAL_OPTIONS: Sequence[str] = ("_allow_extra",)
|
||||
# Default configuration
|
||||
DEFAULT_CONFIG_SCHEMA: types.CONFIG_SCHEMA = OrderedDict([
|
||||
|
@ -217,7 +224,11 @@ DEFAULT_CONFIG_SCHEMA: types.CONFIG_SCHEMA = OrderedDict([
|
|||
("_filesystem_fsync", {
|
||||
"value": "True",
|
||||
"help": "sync all changes to filesystem during requests",
|
||||
"type": bool})])),
|
||||
"type": bool}),
|
||||
("predefined_collections", {
|
||||
"value": "",
|
||||
"help": "predefined user collections",
|
||||
"type": json_str})])),
|
||||
("hook", OrderedDict([
|
||||
("type", {
|
||||
"value": "none",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue