From 3675a4cf3f0076cb1885715ad7d6f034308936ec Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Mon, 29 Jan 2024 14:28:30 +1100 Subject: [PATCH] disable user exports if using azure --- bookwyrm/templates/settings/imports/imports.html | 5 ++++- bookwyrm/views/admin/imports.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bookwyrm/templates/settings/imports/imports.html b/bookwyrm/templates/settings/imports/imports.html index ca53dd410..8693f7b68 100644 --- a/bookwyrm/templates/settings/imports/imports.html +++ b/bookwyrm/templates/settings/imports/imports.html @@ -157,10 +157,13 @@ >

{% trans "Users are currently unable to start new user exports. This is the default setting." %}

+ {% if use_azure %} +

{% trans "It is not currently possible to provide user exports when using Azure storage." %}

+ {% endif %}
{% csrf_token %}
-
diff --git a/bookwyrm/views/admin/imports.py b/bookwyrm/views/admin/imports.py index 0924536bf..1009f4149 100644 --- a/bookwyrm/views/admin/imports.py +++ b/bookwyrm/views/admin/imports.py @@ -9,7 +9,7 @@ from django.views.decorators.http import require_POST from bookwyrm import models from bookwyrm.views.helpers import redirect_to_referer -from bookwyrm.settings import PAGE_LENGTH, USE_S3 +from bookwyrm.settings import PAGE_LENGTH, USE_AZURE # pylint: disable=no-self-use @@ -59,7 +59,7 @@ class ImportList(View): "import_size_limit": site_settings.import_size_limit, "import_limit_reset": site_settings.import_limit_reset, "user_import_time_limit": site_settings.user_import_time_limit, - "use_s3": USE_S3, + "use_azure": USE_AZURE, } return TemplateResponse(request, "settings/imports/imports.html", data)