From a8f7530263fbed3c0f188314818ea0384f3466d7 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Thu, 13 Jul 2023 21:01:00 +0200 Subject: [PATCH] Force authorization for all routes --- storage/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/storage/views.py b/storage/views.py index 27039cc..4fd1fbc 100644 --- a/storage/views.py +++ b/storage/views.py @@ -58,6 +58,7 @@ def apply_smart_search(query, objects): return objects +@login_required def index(request): # get_roots was removed, so we're doing it this way now. return render( @@ -65,6 +66,7 @@ def index(request): ) +@login_required def search(request): query = request.GET.get("q", "") @@ -83,6 +85,7 @@ def search(request): ) +@login_required def item_display(request, pk): if not pk: return index(request)