drf-writable-nested icon indicating copy to clipboard operation
drf-writable-nested copied to clipboard

DRF permission support on related objects

Open charanjit-singh opened this issue 4 years ago • 2 comments

Currently, this package just acts as a serializer, and leaves no room to define permissions of related objects anywhere. Any suggestions, maintainers??

charanjit-singh avatar Nov 21 '19 16:11 charanjit-singh

Hello @charanjit-singh! You can't set up permissions for related objects because as you said this package just acts as a serializer. Could you please describe your use case? Maybe it can be solved with validation or with different root serializers for different permissions?

ruscoder avatar Nov 23 '19 10:11 ruscoder

Hi all, I've got the same issue. Serializer X has object permissions in its View, to prevent the object being overwritten if it is a shared resource between different instances. Serializer Y nests Serializer X as a field but it does not take in those permissions because as you mentioned it acts purely as a serializer. My use case is far more complicated than that as it involves multiple nested layers but that's the crux of the use case issue I'm facing.

mdarke1 avatar Feb 05 '20 00:02 mdarke1