Skip to content

Commit

Permalink
disable user exports if using azure
Browse files Browse the repository at this point in the history
  • Loading branch information
hughrun committed Jan 29, 2024
1 parent 5f7be84 commit 3675a4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion bookwyrm/templates/settings/imports/imports.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,13 @@
>
<div class="notification is-danger is-light">
<p class="my-2">{% trans "Users are currently unable to start new user exports. This is the default setting." %}</p>
{% if use_azure %}
<p>{% trans "It is not currently possible to provide user exports when using Azure storage." %}</p>
{% endif %}
</div>
{% csrf_token %}
<div class="control">
<button type="submit" class="button is-success">
<button type="submit" class="button is-success" {% if use_azure %}disabled{% endif %}>
{% trans "Enable user exports" %}
</button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions bookwyrm/views/admin/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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
Expand Down Expand Up @@ -59,7 +59,7 @@ def get(self, request, status="active"):
"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)

Expand Down

0 comments on commit 3675a4c

Please sign in to comment.