Update UJ/UJT endpoints, update approval RBAC, update approval timeout

This commit is contained in:
beeankha
2019-08-08 16:36:42 -04:00
committed by Ryan Petrello
parent 544a5063f3
commit d9f3fed06f
7 changed files with 53 additions and 48 deletions

View File

@@ -4461,7 +4461,7 @@ class WorkflowApprovalApprove(RetrieveAPIView):
raise PermissionDenied(detail=_("User does not have permission to approve or deny this workflow."))
if obj.status != 'pending':
return Response("This workflow step has already been approved or denied.", status=status.HTTP_400_BAD_REQUEST)
obj.approve()
obj.approve(request)
return Response(status=status.HTTP_204_NO_CONTENT)
@@ -4476,7 +4476,7 @@ class WorkflowApprovalDeny(RetrieveAPIView):
raise PermissionDenied(detail=_("User does not have permission to approve or deny this workflow."))
if obj.status != 'pending':
return Response("This workflow step has already been approved or denied.", status=status.HTTP_400_BAD_REQUEST)
obj.deny()
obj.deny(request)
return Response(status=status.HTTP_204_NO_CONTENT)