Add endpoints for approval node notifications

...and also add a migration file.
This commit is contained in:
beeankha
2019-09-04 12:06:37 -04:00
parent d2a5af44de
commit 6be2d84adb
12 changed files with 142 additions and 6 deletions

View File

@@ -119,6 +119,7 @@ from awx.api.views.organization import ( # noqa
OrganizationNotificationTemplatesErrorList,
OrganizationNotificationTemplatesStartedList,
OrganizationNotificationTemplatesSuccessList,
OrganizationNotificationTemplatesApprovalList,
OrganizationInstanceGroupsList,
OrganizationAccessList,
OrganizationObjectRolesList,
@@ -3288,6 +3289,11 @@ class WorkflowJobTemplateNotificationTemplatesSuccessList(WorkflowJobTemplateNot
relationship = 'notification_templates_success'
class WorkflowJobTemplateNotificationTemplatesApprovalList(WorkflowJobTemplateNotificationTemplatesAnyList):
relationship = 'approval_notifications'
class WorkflowJobTemplateAccessList(ResourceAccessList):
model = models.User # needs to be User for AccessLists's
@@ -4458,6 +4464,18 @@ class WorkflowApprovalTemplateJobsList(SubListAPIView):
parent_key = 'workflow_approval_template'
class WorkflowApprovalTemplateNotificationTemplatesList(SubListCreateAttachDetachAPIView):
model = models.NotificationTemplate
serializer_class = serializers.NotificationTemplateSerializer
parent_model = models.WorkflowApprovalTemplate
class WorkflowApprovalNotificationTemplatesList(WorkflowApprovalTemplateNotificationTemplatesList):
relationship = 'approval_notifications'
class WorkflowApprovalList(ListCreateAPIView):
model = models.WorkflowApproval