mirror of
https://github.com/ansible/awx.git
synced 2026-07-08 06:48:04 -02:30
Disable POST to v1 inventory_sources
This commit is contained in:
@@ -2532,6 +2532,13 @@ class InventorySourceList(ListCreateAPIView):
|
||||
always_allow_superuser = False
|
||||
new_in_320 = True
|
||||
|
||||
@property
|
||||
def allowed_methods(self):
|
||||
methods = super(InventorySourceList, self).allowed_methods
|
||||
if get_request_version(self.request) == 1:
|
||||
methods.remove('POST')
|
||||
return methods
|
||||
|
||||
|
||||
class InventorySourceDetail(RetrieveUpdateDestroyAPIView):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user