mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
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…
x
Reference in New Issue
Block a user