Read book is now tied to the right downlolad books for guest users (fixes #110)
This commit is contained in:
parent
1a83ad713c
commit
00763d6e4c
|
@ -132,10 +132,10 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if g.user.is_authenticated %}
|
{% if g.user.kindle_mail and g.user.is_authenticated %}
|
||||||
{% if g.user.kindle_mail %}
|
|
||||||
<a href="{{url_for('send_to_kindle', book_id=entry.id)}}" id="sendbtn" class="btn btn-primary" role="button"><span class="glyphicon glyphicon-send"></span> {{_('Send to Kindle')}}</a>
|
<a href="{{url_for('send_to_kindle', book_id=entry.id)}}" id="sendbtn" class="btn btn-primary" role="button"><span class="glyphicon glyphicon-send"></span> {{_('Send to Kindle')}}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if (g.user.role_download() and g.user.is_anonymous()) or g.user.is_authenticated %}
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group" role="group">
|
||||||
<button id="btnGroupDrop2" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button id="btnGroupDrop2" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<span class="glyphicon glyphicon-eye-open"></span> {{_('Read in browser')}}
|
<span class="glyphicon glyphicon-eye-open"></span> {{_('Read in browser')}}
|
||||||
|
|
|
@ -1203,7 +1203,7 @@ def feed_get_cover(book_id):
|
||||||
|
|
||||||
|
|
||||||
@app.route("/read/<int:book_id>/<format>")
|
@app.route("/read/<int:book_id>/<format>")
|
||||||
@login_required
|
@login_required_if_no_ano
|
||||||
def read_book(book_id, format):
|
def read_book(book_id, format):
|
||||||
book = db.session.query(db.Books).filter(db.Books.id == book_id).first()
|
book = db.session.query(db.Books).filter(db.Books.id == book_id).first()
|
||||||
if book:
|
if book:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user