1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-24 18:47:23 +00:00

Fix visibility for sending to reader without download permissions (fix for #2847)

This commit is contained in:
Ozzie Isaacs 2023-07-29 15:15:38 +02:00
parent fda62dde1d
commit 279f0569e4
2 changed files with 25 additions and 24 deletions

View File

@ -40,6 +40,7 @@ $(".sendbtn-form").click(function() {
$.ajax({ $.ajax({
method: 'post', method: 'post',
url: $(this).data('href'), url: $(this).data('href'),
data: {csrf_token: $("input[name='csrf_token']").val()},
success: function (data) { success: function (data) {
handleResponse(data) handleResponse(data)
} }

View File

@ -43,7 +43,6 @@
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
{% endif %}
{% if current_user.kindle_mail and entry.email_share_list %} {% if current_user.kindle_mail and entry.email_share_list %}
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
{% if entry.email_share_list.__len__() == 1 %} {% if entry.email_share_list.__len__() == 1 %}
@ -69,6 +68,7 @@
</div> </div>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %}
{% if entry.reader_list and current_user.role_viewer() %} {% if entry.reader_list and current_user.role_viewer() %}
<div class="btn-group" role="group"> <div class="btn-group" role="group">
{% if entry.reader_list|length > 1 %} {% if entry.reader_list|length > 1 %}