diff --git a/awx/api/views.py b/awx/api/views.py index efbbecf10e..4a7e29da16 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -3677,6 +3677,7 @@ class NotificationTemplateTest(GenericAPIView): model = NotificationTemplate serializer_class = EmptySerializer new_in_300 = True + is_job_start = True def post(self, request, *args, **kwargs): obj = self.get_object() diff --git a/awx/main/access.py b/awx/main/access.py index c7eb368cad..d4b65113aa 100644 --- a/awx/main/access.py +++ b/awx/main/access.py @@ -1641,6 +1641,12 @@ class NotificationTemplateAccess(BaseAccess): def can_delete(self, obj): return self.can_change(obj, None) + @check_superuser + def can_start(self, obj): + if obj.organization is None: + return False + return self.user in obj.organization.admin_role + class NotificationAccess(BaseAccess): ''' I can see/use a notification if I have permission to