Skip to content

Commit

Permalink
fix: allow large exports for superuser in UI (#3884)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpcross authored Dec 5, 2024
1 parent 39a581d commit 92423fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/mlarchive/templates/archive/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ <h5 class="modal-title" id="export-modal-title">Archive Export</h5>

<div class="export-text">
{% if user.is_authenticated %}
{% if count > export_limit %}
{% if count > export_limit and not user.is_superuser %}
<p>Export is limited to {{ export_limit }} messages.</p>
{% else %}
<p>Exporting {{ count|intcomma }} messages. Select an export type.</p>
Expand All @@ -211,9 +211,9 @@ <h5 class="modal-title" id="export-modal-title">Archive Export</h5>
</div>
</div> <!-- modal-body -->
<div class="modal-footer">
<a class="btn btn-secondary export-link{% if not user.is_authenticated or count > export_limit %} disabled{% endif %}" href="{{ export_mbox }}">Mbox</a>
<a class="btn btn-secondary export-link{% if not user.is_authenticated or count > export_limit %} disabled{% endif %}" href="{{ export_maildir }}">Maildir</a>
<a class="btn btn-secondary export-link{% if not user.is_authenticated or count > export_limit %} disabled{% endif %}" href="{{ export_url }}">URLs</a>
<a class="btn btn-secondary export-link{% if not user.is_authenticated or count > export_limit and not user.is_superuser %} disabled{% endif %}" href="{{ export_mbox }}">Mbox</a>
<a class="btn btn-secondary export-link{% if not user.is_authenticated or count > export_limit and not user.is_superuser %} disabled{% endif %}" href="{{ export_maildir }}">Maildir</a>
<a class="btn btn-secondary export-link{% if not user.is_authenticated or count > export_limit and not user.is_superuser %} disabled{% endif %}" href="{{ export_url }}">URLs</a>
</div>
</div>
</div>
Expand Down

0 comments on commit 92423fd

Please sign in to comment.