From 2a1818d09aea8c1beb0afe1be1cad0ed4d5364be Mon Sep 17 00:00:00 2001 From: Jeff Bogatay Date: Tue, 23 Aug 2016 11:31:54 -0400 Subject: [PATCH] Secure document fetching --- src/documents/views.py | 2 +- src/paperless/settings.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/documents/views.py b/src/documents/views.py index 71d350e02..d47ab8654 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -31,7 +31,7 @@ class IndexView(TemplateView): return TemplateView.get_context_data(self, **kwargs) -class FetchView(DetailView): +class FetchView(LoginRequiredMixin, DetailView): model = Document diff --git a/src/paperless/settings.py b/src/paperless/settings.py index faf532d52..c80434bc7 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -27,6 +27,8 @@ SECRET_KEY = 'e11fl1oa-*ytql8p)(06fbj4ukrlo+n7k&q5+$1md7i+mge=ee' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True +LOGIN_URL = '/admin/login' + ALLOWED_HOSTS = []