mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 09:57:33 -02:30
AC-686 Fix permissions for inventory source to allow org admins and users with write permissions to update.
This commit is contained in:
@@ -826,6 +826,7 @@ class InventorySourceUpdatesList(SubListAPIView):
|
||||
class InventorySourceUpdateView(GenericAPIView):
|
||||
|
||||
model = InventorySource
|
||||
is_job_start = True
|
||||
new_in_14 = True
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
@@ -838,7 +839,7 @@ class InventorySourceUpdateView(GenericAPIView):
|
||||
def post(self, request, *args, **kwargs):
|
||||
obj = self.get_object()
|
||||
if obj.can_update:
|
||||
inventory_update = obj.update(**request.DATA)
|
||||
inventory_update = obj.update()
|
||||
if not inventory_update:
|
||||
return Response({}, status=status.HTTP_400_BAD_REQUEST)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user