Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow large exports for superuser in UI #3884

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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