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:
parent
ddd88b95b5
commit
1128c55cc3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user