diff --git a/realms/modules/search/views.py b/realms/modules/search/views.py index 7d74e20..ab48f54 100644 --- a/realms/modules/search/views.py +++ b/realms/modules/search/views.py @@ -11,7 +11,7 @@ blueprint = Blueprint('search', __name__, template_folder='templates') @blueprint.route('/_search') def search(): - if current_app.config.get('PRIVATE_WIKI') and current_user.is_anonymous(): + if current_app.config.get('PRIVATE_WIKI') and current_user.is_anonymous: return current_app.login_manager.unauthorized() results = search_engine.wiki(request.args.get('q')) diff --git a/realms/modules/wiki/views.py b/realms/modules/wiki/views.py index 528e29a..8dd0ada 100644 --- a/realms/modules/wiki/views.py +++ b/realms/modules/wiki/views.py @@ -80,7 +80,7 @@ def history(name): @blueprint.route("/_history_data/") def history_data(name): """Ajax provider for paginated history data.""" - if current_app.config.get('PRIVATE_WIKI') and current_user.is_anonymous(): + if current_app.config.get('PRIVATE_WIKI') and current_user.is_anonymous: return current_app.login_manager.unauthorized() draw = int(request.args.get('draw', 0)) start = int(request.args.get('start', 0)) @@ -145,7 +145,7 @@ def _partials(imports, sha='HEAD'): @blueprint.route("/_partials") def partials(): - if current_app.config.get('PRIVATE_WIKI') and current_user.is_anonymous(): + if current_app.config.get('PRIVATE_WIKI') and current_user.is_anonymous: return current_app.login_manager.unauthorized() return {'partials': _partials(request.args.getlist('imports[]'))}