Why doesn't django rest framework check object permissions when creating an object? It makes no sense (to me, anyway) that a user should be able to create an object they couldn't see, update, or delete. Currently I subclass a viewset like
class CheckCreatePermissionsViewSet(ModelViewSet):
def perform_create(self, serializer):
'''
Called by create before calling serializer.save()
'''
obj = serializer.save()
try:
self.check_object_permissions(obj)
except:
obj.delete()
raise
Why isn't this implemented by default? It's caused quite the headache for me, and I can't think of a single reason it would be implemented like this.