Implement wfjt access list.

This commit is contained in:
Aaron Tan 2016-11-21 11:37:59 -05:00
parent ab840f9551
commit b4cc024d50
3 changed files with 9 additions and 0 deletions

View File

@ -2216,6 +2216,7 @@ class WorkflowJobTemplateSerializer(LabelsListMixin, UnifiedJobTemplateSerialize
notification_templates_any = reverse('api:workflow_job_template_notification_templates_any_list', args=(obj.pk,)),
notification_templates_success = reverse('api:workflow_job_template_notification_templates_success_list', args=(obj.pk,)),
notification_templates_error = reverse('api:workflow_job_template_notification_templates_error_list', args=(obj.pk,)),
access_list = reverse('api:workflow_job_template_access_list', args=(obj.pk,)),
survey_spec = reverse('api:workflow_job_template_survey_spec', args=(obj.pk,)),
))
return res

View File

@ -268,6 +268,7 @@ workflow_job_template_urls = patterns('awx.api.views',
url(r'^(?P<pk>[0-9]+)/notification_templates_any/$', 'workflow_job_template_notification_templates_any_list'),
url(r'^(?P<pk>[0-9]+)/notification_templates_error/$', 'workflow_job_template_notification_templates_error_list'),
url(r'^(?P<pk>[0-9]+)/notification_templates_success/$', 'workflow_job_template_notification_templates_success_list'),
url(r'^(?P<pk>[0-9]+)/access_list/$', 'workflow_job_template_access_list'),
url(r'^(?P<pk>[0-9]+)/labels/$', 'workflow_job_template_label_list'),
# url(r'^(?P<pk>[0-9]+)/cancel/$', 'workflow_job_template_cancel'),
)

View File

@ -3080,6 +3080,13 @@ class WorkflowJobNotificationsList(SubListAPIView):
new_in_310 = True
class WorkflowJobTemplateAccessList(ResourceAccessList):
model = User # needs to be User for AccessLists's
resource_model = WorkflowJobTemplate
new_in_310 = True
class SystemJobTemplateList(ListAPIView):
model = SystemJobTemplate