views.py
@@ -12,6 +12,7 @@ |
import django.shortcuts |
from django.http import Http404, HttpResponse |
from django.views.decorators.csrf import csrf_exempt |
+from django.contrib.auth.decorators import login_required |
|
import er2.common.api as er2_api |
from er2.apps.er2_map.views import get_token, return_with_exception |
@@ -65,6 +66,7 @@ |
raise Http404("Not allowed") |
|
|
+@login_required |
@csrf_exempt |
def upload_stations_third_party(request): |
if request.user.id == "cdphe_admin": |
@@ -75,6 +77,7 @@ |
raise Http404("Not allowed") |
|
|
+@login_required |
@csrf_exempt |
def append_stations_third_party(request): |
if request.user.id == "cdphe_admin": |
@@ -284,6 +287,7 @@ |
|
|
@csrf_exempt |
+@login_required |
@return_with_exception |
def add_to_assessment_registry(request): |
request_state = er2_api.load_json(request.body) |
@@ -293,6 +297,7 @@ |
|
|
@csrf_exempt |
+@login_required |
@return_with_exception |
def remove_from_assessment_registry(request): |
request_state = er2_api.load_json(request.body) |
@@ -303,12 +308,14 @@ |
|
|
@csrf_exempt |
+@login_required |
@return_with_exception |
def get_tracking(request): |
return svcs.Tracking(request=request).process() |
|
|
@csrf_exempt |
+@login_required |
@return_with_exception |
def add_to_tracking(request): |
return svcs.Tracking(request=request).add() |