make is_active, is_authenticated, and is_anonymous properties on the Anonymous class so that the login_required decorator will work correctly and disable anonymous browsing

This commit is contained in:
Cory Sitko
2017-10-10 10:18:28 -04:00
parent 366bf9739b
commit 7ade2ecd35
6 changed files with 26 additions and 23 deletions

View File

@@ -84,7 +84,7 @@
bookUrl: "{{ url_for('static', filename=bookid) }}/",
bookmarkUrl: "{{ url_for('bookmark', book_id=bookid, book_format='EPUB') }}",
bookmark: "{{ bookmark.bookmark_key if bookmark != None }}",
useBookmarks: {{ g.user.is_authenticated() | tojson }}
useBookmarks: {{ g.user.is_authenticated | tojson }}
};
</script>
<script src="{{ url_for('static', filename='js/libs/jquery.min.js') }}"></script>