Compare commits

..

4 Commits

@ -646,7 +646,9 @@ def _configuration_update_helper():
return _configuration_result(_('Certfile Location is not Valid, Please Enter Correct Path'), gdriveError) return _configuration_result(_('Certfile Location is not Valid, Please Enter Correct Path'), gdriveError)
_config_checkbox_int(to_save, "config_uploading") _config_checkbox_int(to_save, "config_uploading")
_config_checkbox_int(to_save, "config_anonbrowse") # Reboot on config_anonbrowse with enabled ldap, as decoraters are changed in this case
reboot_required |= (_config_checkbox_int(to_save, "config_anonbrowse")
and config.config_login_type == constants.LOGIN_LDAP)
_config_checkbox_int(to_save, "config_public_reg") _config_checkbox_int(to_save, "config_public_reg")
_config_checkbox_int(to_save, "config_register_email") _config_checkbox_int(to_save, "config_register_email")
reboot_required |= _config_checkbox_int(to_save, "config_kobo_sync") reboot_required |= _config_checkbox_int(to_save, "config_kobo_sync")

@ -652,9 +652,6 @@ def edit_book(book_id):
if to_save["cover_url"]: if to_save["cover_url"]:
if not current_user.role_upload(): if not current_user.role_upload():
return "", (403) return "", (403)
if to_save["cover_url"].endswith('/static/generic_cover.jpg'):
book.has_cover = 0
else:
result, error = helper.save_cover_from_url(to_save["cover_url"], book.path) result, error = helper.save_cover_from_url(to_save["cover_url"], book.path)
if result is True: if result is True:
book.has_cover = 1 book.has_cover = 1

@ -51,7 +51,7 @@ def requires_basic_auth_if_no_ano(f):
if not auth or auth.type != 'basic' or not check_auth(auth.username, auth.password): if not auth or auth.type != 'basic' or not check_auth(auth.username, auth.password):
return authenticate() return authenticate()
return f(*args, **kwargs) return f(*args, **kwargs)
if config.config_login_type == constants.LOGIN_LDAP and services.ldap: if config.config_login_type == constants.LOGIN_LDAP and services.ldap and config.config_anonbrowse != 1:
return services.ldap.basic_auth_required(f) return services.ldap.basic_auth_required(f)
return decorated return decorated

@ -108,7 +108,7 @@ $(function () {
tags: result.volumeInfo.categories || [], tags: result.volumeInfo.categories || [],
rating: result.volumeInfo.averageRating || 0, rating: result.volumeInfo.averageRating || 0,
cover: result.volumeInfo.imageLinks ? cover: result.volumeInfo.imageLinks ?
result.volumeInfo.imageLinks.thumbnail : location + "/../../../static/generic_cover.jpg", result.volumeInfo.imageLinks.thumbnail : "/static/generic_cover.jpg",
url: "https://books.google.com/books?id=" + result.id, url: "https://books.google.com/books?id=" + result.id,
source: { source: {
id: "google", id: "google",

@ -8,7 +8,7 @@ Flask>=1.0.2,<1.2.0
iso-639>=0.4.5,<0.5.0 iso-639>=0.4.5,<0.5.0
PyPDF2==1.26.0,<1.27.0 PyPDF2==1.26.0,<1.27.0
pytz>=2016.10 pytz>=2016.10
requests>=2.11.1,<2.26.0 requests>=2.11.1,<2.25.0
SQLAlchemy>=1.3.0,<1.4.0 SQLAlchemy>=1.3.0,<1.4.0
tornado>=4.1,<6.2 tornado>=4.1,<6.2
Wand>=0.4.4,<0.6.0 Wand>=0.4.4,<0.6.0

Loading…
Cancel
Save