mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
fix(network): Require login for network view
This commit is contained in:
@@ -134,6 +134,16 @@ DBBACKUP_STORAGE_OPTIONS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Django REST Framework
|
||||||
|
# https://www.django-rest-framework.org/
|
||||||
|
|
||||||
|
REST_FRAMEWORK = {
|
||||||
|
'DEFAULT_PERMISSION_CLASSES': [
|
||||||
|
'rest_framework.permissions.IsAuthenticated',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Password validation
|
# Password validation
|
||||||
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
|
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Views for displaying or manipulating models in the 'people' app.
|
Views for displaying or manipulating models in the 'people' app.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.views.generic import CreateView, DetailView, ListView, TemplateView, UpdateView
|
from django.views.generic import CreateView, DetailView, ListView, TemplateView, UpdateView
|
||||||
@@ -206,7 +207,7 @@ class RelationshipApiView(APIView):
|
|||||||
return Response(serializer.data)
|
return Response(serializer.data)
|
||||||
|
|
||||||
|
|
||||||
class NetworkView(TemplateView):
|
class NetworkView(LoginRequiredMixin, TemplateView):
|
||||||
"""
|
"""
|
||||||
View to display relationship network.
|
View to display relationship network.
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user