mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
Fix an issue where non super users would not be able to update a job
template survey spec
This commit is contained in:
@@ -1503,7 +1503,7 @@ class JobTemplateSurveySpec(GenericAPIView):
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
obj = self.get_object()
|
||||
if not request.user.can_access(self.model, 'change', obj, request.DATA):
|
||||
if not request.user.can_access(self.model, 'change', obj, None):
|
||||
raise PermissionDenied()
|
||||
try:
|
||||
obj.survey_spec = json.dumps(request.DATA)
|
||||
|
||||
Reference in New Issue
Block a user