mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
remove the User.object_roles view
This commit is contained in:
parent
a47f47b790
commit
203ebd20e8
@ -1201,19 +1201,6 @@ class UserRolesList(SubListCreateAttachDetachAPIView):
|
||||
# We hide roles that shouldn't be seen in our queryset
|
||||
return True
|
||||
|
||||
class UserObjectRolesList(SubListAPIView):
|
||||
|
||||
model = Role
|
||||
serializer_class = RoleSerializer
|
||||
parent_model = User
|
||||
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 UserProjectsList(SubListAPIView):
|
||||
|
||||
model = Project
|
||||
|
Loading…
Reference in New Issue
Block a user