From 173484c30e7b00e77b74f4a285292ebb5f114672 Mon Sep 17 00:00:00 2001 From: OzzieIsaacs Date: Tue, 1 Sep 2020 19:25:57 +0200 Subject: [PATCH] Fix #1002, #1581 (Public shelfs not accessible as guest user) --- cps/shelf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cps/shelf.py b/cps/shelf.py index 37cfc02a..19a350d5 100644 --- a/cps/shelf.py +++ b/cps/shelf.py @@ -30,7 +30,7 @@ from sqlalchemy.sql.expression import func from sqlalchemy.exc import OperationalError, InvalidRequestError from . import logger, ub, searched_ids, calibre_db -from .web import render_title_template +from .web import login_required_if_no_ano, render_title_template shelf = Blueprint('shelf', __name__) @@ -341,7 +341,7 @@ def delete_shelf(shelf_id): @shelf.route("/shelf/", defaults={'shelf_type': 1}) @shelf.route("/shelf//") -@login_required +@login_required_if_no_ano def show_shelf(shelf_type, shelf_id): shelf = ub.session.query(ub.Shelf).filter(ub.Shelf.id == shelf_id).first()