1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Fixes https://trello.com/c/gZw3WBxA - Make sure job callback view is csrf exempt.

This commit is contained in:
Chris Church 2014-09-11 22:58:47 -04:00
parent ddd88b95b5
commit 1128c55cc3

View File

@ -19,6 +19,7 @@ from django.db import IntegrityError, transaction
from django.shortcuts import get_object_or_404
from django.utils.datastructures import SortedDict
from django.utils.timezone import now
from django.views.decorators.csrf import csrf_exempt
# Django REST Framework
from rest_framework.authtoken.views import ObtainAuthToken
@ -1414,6 +1415,7 @@ class JobTemplateCallback(GenericAPIView):
model = JobTemplate
permission_classes = (JobTemplateCallbackPermission,)
@csrf_exempt
@transaction.non_atomic_requests
def dispatch(self, *args, **kwargs):
return super(JobTemplateCallback, self).dispatch(*args, **kwargs)