mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 14:09:28 -02:30
remove /api/v1 and deprecated credential fields
This commit is contained in:
@@ -1001,19 +1001,6 @@ class GroupAccess(BaseAccess):
|
||||
def can_delete(self, obj):
|
||||
return bool(obj and self.user in obj.inventory.admin_role)
|
||||
|
||||
def can_start(self, obj, validate_license=True):
|
||||
# TODO: Delete for 3.3, only used by v1 serializer
|
||||
# Used as another alias to inventory_source start access for user_capabilities
|
||||
if obj:
|
||||
try:
|
||||
return self.user.can_access(
|
||||
InventorySource, 'start', obj.deprecated_inventory_source,
|
||||
validate_license=validate_license)
|
||||
obj.deprecated_inventory_source
|
||||
except Group.deprecated_inventory_source.RelatedObjectDoesNotExist:
|
||||
return False
|
||||
return False
|
||||
|
||||
|
||||
class InventorySourceAccess(NotificationAttachMixin, BaseAccess):
|
||||
'''
|
||||
@@ -2387,11 +2374,6 @@ class UnifiedJobTemplateAccess(BaseAccess):
|
||||
Q(inventorysource__inventory__id__in=Inventory._accessible_pk_qs(
|
||||
Inventory, self.user, 'read_role')))
|
||||
|
||||
def get_queryset(self):
|
||||
# TODO: remove after the depreciation of v1 API
|
||||
qs = super(UnifiedJobTemplateAccess, self).get_queryset()
|
||||
return qs.exclude(inventorysource__source="")
|
||||
|
||||
def can_start(self, obj, validate_license=True):
|
||||
access_class = access_registry[obj.__class__]
|
||||
access_instance = access_class(self.user)
|
||||
|
||||
Reference in New Issue
Block a user