Merge pull request #2387 from wwitzel3/issue-2316

remove User.object_roles endpoint and discovery
This commit is contained in:
Wayne Witzel III
2016-06-14 13:43:58 -04:00
committed by GitHub
3 changed files with 0 additions and 15 deletions
-13
View File
@@ -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