mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Add endpoints for approval node notifications
...and also add a migration file.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user