Skip to content

Commit

Permalink
Updated test status
Browse files Browse the repository at this point in the history
Fix for #2614 (Send to eReader not working for guest user)
  • Loading branch information
OzzieIsaacs committed Jan 24, 2023
1 parent 36cb454 commit 4913f06
Show file tree
Hide file tree
Showing 3 changed files with 556 additions and 904 deletions.
1 change: 1 addition & 0 deletions cps/templates/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
{% endif %}
{% endif %}
{% if g.user.kindle_mail and entry.email_share_list %}
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
{% if entry.email_share_list.__len__() == 1 %}
<div id="sendbtn" data-action="{{url_for('web.send_to_ereader', book_id=entry.id, book_format=entry.email_share_list[0]['format'], convert=entry.email_share_list[0]['convert'])}}" data-text="{{_('Send to eReader')}}" class="btn btn-primary postAction" role="button"><span class="glyphicon glyphicon-send"></span> {{entry.email_share_list[0]['text']}}</div>
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion cps/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ def download_link(book_id, book_format, anyname):


@web.route('/send/<int:book_id>/<book_format>/<int:convert>', methods=["POST"])
@login_required
@login_required_if_no_ano
@download_required
def send_to_ereader(book_id, book_format, convert):
if not config.get_mail_server_configured():
Expand Down
Loading

0 comments on commit 4913f06

Please sign in to comment.