Merge remote-tracking branch '401/patch-1'

This commit is contained in:
Ozzie Isaacs
2025-12-14 14:37:11 +01:00
2 changed files with 3 additions and 2 deletions

View File

@@ -21,7 +21,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import datetime
# import json
from urllib.parse import unquote_plus
from flask import Blueprint, request, render_template, make_response, abort, g, jsonify
@@ -439,6 +438,7 @@ def feed_shelf(book_id):
@opds.route("/opds/download/<book_id>/<book_format>/")
@requires_basic_auth_if_no_ano
def opds_download_link(book_id, book_format):
return abort(401)
if not auth.current_user().role_download():
return abort(401)
client = "kobo" if "Kobo" in request.headers.get('User-Agent') else ""