mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Removed some missed things from our Group role removal work
* Removed `groups/n/object_roles` * Removed `groups/n/access_list` * `active_roles` from the Group `summary_fields` #2631
This commit is contained in:
parent
20ba96ae84
commit
ca2b4766a5
@ -1186,8 +1186,6 @@ class GroupSerializer(BaseSerializerWithVariables):
|
||||
activity_stream = reverse('api:group_activity_stream_list', args=(obj.pk,)),
|
||||
inventory_sources = reverse('api:group_inventory_sources_list', args=(obj.pk,)),
|
||||
ad_hoc_commands = reverse('api:group_ad_hoc_commands_list', args=(obj.pk,)),
|
||||
access_list = reverse('api:group_access_list', args=(obj.pk,)),
|
||||
object_roles = reverse('api:group_object_roles_list', args=(obj.pk,)),
|
||||
#single_fact = reverse('api:group_single_fact_view', args=(obj.pk,)),
|
||||
))
|
||||
if obj.inventory:
|
||||
|
@ -127,8 +127,6 @@ group_urls = patterns('awx.api.views',
|
||||
url(r'^(?P<pk>[0-9]+)/activity_stream/$', 'group_activity_stream_list'),
|
||||
url(r'^(?P<pk>[0-9]+)/inventory_sources/$', 'group_inventory_sources_list'),
|
||||
url(r'^(?P<pk>[0-9]+)/ad_hoc_commands/$', 'group_ad_hoc_commands_list'),
|
||||
url(r'^(?P<pk>[0-9]+)/access_list/$', 'group_access_list'),
|
||||
url(r'^(?P<pk>[0-9]+)/object_roles/$', 'group_object_roles_list'),
|
||||
#url(r'^(?P<pk>[0-9]+)/single_fact/$', 'group_single_fact_view'),
|
||||
)
|
||||
|
||||
|
@ -1870,25 +1870,6 @@ class GroupDetail(RetrieveUpdateDestroyAPIView):
|
||||
obj.delete_recursive()
|
||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
class GroupAccessList(ResourceAccessList):
|
||||
|
||||
model = User # needs to be User for AccessLists's
|
||||
resource_model = Group
|
||||
new_in_300 = True
|
||||
|
||||
class GroupObjectRolesList(SubListAPIView):
|
||||
|
||||
model = Role
|
||||
serializer_class = RoleSerializer
|
||||
parent_model = Group
|
||||
new_in_300 = True
|
||||
|
||||
def get_queryset(self):
|
||||
po = self.get_parent_object()
|
||||
content_type = ContentType.objects.get_for_model(self.parent_model)
|
||||
return Role.objects.filter(content_type=content_type, object_id=po.pk)
|
||||
|
||||
|
||||
class InventoryGroupsList(SubListCreateAttachDetachAPIView):
|
||||
|
||||
model = Group
|
||||
|
@ -443,7 +443,7 @@ class Host(CommonModelNameNotUnique):
|
||||
# Use .job_events.all() to get events affecting this host.
|
||||
|
||||
|
||||
class Group(CommonModelNameNotUnique, ResourceMixin):
|
||||
class Group(CommonModelNameNotUnique):
|
||||
'''
|
||||
A group containing managed hosts. A group or host may belong to multiple
|
||||
groups.
|
||||
|
Loading…
Reference in New Issue
Block a user