diff --git a/.env.template b/.env.template index c37bf68a..05256c47 100644 --- a/.env.template +++ b/.env.template @@ -82,6 +82,7 @@ REVERSE_PROXY_AUTH=0 # SPACE_DEFAULT_MAX_RECIPES=0 # 0=unlimited recipes # SPACE_DEFAULT_MAX_USERS=0 # 0=unlimited users per space # SPACE_DEFAULT_MAX_FILES=0 # Maximum file storage for space in MB. 0 for unlimited, -1 to disable file upload. +# SPACE_DEFAULT_ALLOW_SHARING=1 # Allow users to share recipes with public links # allow people to create accounts on your application instance (without an invite link) # when unset: 0 (false) diff --git a/cookbook/views/views.py b/cookbook/views/views.py index eabd47c6..68f52d20 100644 --- a/cookbook/views/views.py +++ b/cookbook/views/views.py @@ -115,7 +115,7 @@ def no_space(request): created_space = Space.objects.create( name=create_form.cleaned_data['name'], created_by=request.user, - max_file_storage_mb=settings.SPACE_DEFAULT_FILES, + max_file_storage_mb=settings.SPACE_DEFAULT_MAX_FILES, max_recipes=settings.SPACE_DEFAULT_MAX_RECIPES, max_users=settings.SPACE_DEFAULT_MAX_USERS, ) diff --git a/recipes/settings.py b/recipes/settings.py index ec5c9556..ef9d8da7 100644 --- a/recipes/settings.py +++ b/recipes/settings.py @@ -33,7 +33,8 @@ SOCIAL_DEFAULT_GROUP = os.getenv('SOCIAL_DEFAULT_GROUP', 'guest') SPACE_DEFAULT_MAX_RECIPES = int(os.getenv('SPACE_DEFAULT_MAX_RECIPES', 0)) SPACE_DEFAULT_MAX_USERS = int(os.getenv('SPACE_DEFAULT_MAX_USERS', 0)) -SPACE_DEFAULT_FILES = bool(int(os.getenv('SPACE_DEFAULT_FILES', True))) +SPACE_DEFAULT_MAX_FILES = int(os.getenv('SPACE_DEFAULT_MAX_FILES', 0)) +SPACE_DEFAULT_ALLOW_SHARING = bool(int(os.getenv('SPACE_DEFAULT_ALLOW_SHARING', True))) INTERNAL_IPS = os.getenv('INTERNAL_IPS').split(',') if os.getenv('INTERNAL_IPS') else ['127.0.0.1']