Make sure job starts follow rbac

This commit is contained in:
Matthew Jones
2014-08-06 11:47:03 -04:00
parent 91df59611d
commit bb485c99fe
2 changed files with 3 additions and 1 deletions

View File

@@ -1529,6 +1529,8 @@ class JobStart(GenericAPIView):
def post(self, request, *args, **kwargs):
obj = self.get_object()
if not request.user.can_access(self.model, 'start', obj):
raise PermissionDenied()
if obj.can_start:
result = obj.signal_start(**request.DATA)
if not result: