mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 01:47:31 -02:30
Polishing up work on new endpoint
This commit is contained in:
@@ -395,7 +395,6 @@ class WorkflowJobTemplate(UnifiedJobTemplate, WorkflowJobOptions, SurveyJobTempl
|
||||
'singleton:' + ROLE_SINGLETON_SYSTEM_AUDITOR,
|
||||
'organization.auditor_role', 'execute_role', 'admin_role'
|
||||
])
|
||||
# &&&&&& The below keeps complaining - fixed by new migration file, perhaps?
|
||||
approval_role = ImplicitRoleField(parent_role=[
|
||||
'singleton:' + ROLE_SINGLETON_SYSTEM_AUDITOR,
|
||||
'organization.approval_role', 'admin_role',
|
||||
@@ -637,28 +636,6 @@ class WorkflowApprovalTemplate(UnifiedJobTemplate):
|
||||
def get_absolute_url(self, request=None):
|
||||
return reverse('api:workflow_approval_template_detail', kwargs={'pk': self.pk}, request=request)
|
||||
|
||||
# @property
|
||||
# def notification_templates(self):
|
||||
# # Return all notification_templates defined on the Job Template, on the Project, and on the Organization for each trigger type
|
||||
# base_notification_templates = NotificationTemplate.objects
|
||||
# error_notification_templates = list(base_notification_templates.filter(
|
||||
# unifiedjobtemplate_notification_templates_for_errors__in=[self, self.project]))
|
||||
# started_notification_templates = list(base_notification_templates.filter(
|
||||
# unifiedjobtemplate_notification_templates_for_started__in=[self, self.project]))
|
||||
# success_notification_templates = list(base_notification_templates.filter(
|
||||
# unifiedjobtemplate_notification_templates_for_success__in=[self, self.project]))
|
||||
# &&&&&& Approvals don't have orgs! How to pull them in? Alan said to "get creative"!
|
||||
# if self.project is not None and self.project.organization is not None:
|
||||
# error_notification_templates = set(error_notification_templates + list(base_notification_templates.filter(
|
||||
# organization_notification_templates_for_errors=self.project.organization)))
|
||||
# started_notification_templates = set(started_notification_templates + list(base_notification_templates.filter(
|
||||
# organization_notification_templates_for_started=self.project.organization)))
|
||||
# success_notification_templates = set(success_notification_templates + list(base_notification_templates.filter(
|
||||
# organization_notification_templates_for_success=self.project.organization)))
|
||||
# return dict(error=list(error_notification_templates),
|
||||
# started=list(started_notification_templates),
|
||||
# success=list(success_notification_templates))
|
||||
|
||||
|
||||
class WorkflowApproval(UnifiedJob):
|
||||
class Meta:
|
||||
|
||||
Reference in New Issue
Block a user