You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, awesome library. It does almost exactly how I've been looking to fix DRF permissions for myself for awhile.
My one question/thought is... This implementation is heavily coupled to the idea that a permission allows a user to access (or not access) a certain field on a certain model. However, there are definitely cases where what is really desired is restricting access to a certain serializer field for a user. Is this a use case you'd be interested in supporting?
The text was updated successfully, but these errors were encountered:
Hi jpulec, thanks for you attention.
If I understand you right, the feature you are interested in is already implemented.
The favored and most outright way of restricting access to a specific serializer field for a user, would be to define a SerializerMethodField in your serializer and then access it in the administration interface.
Another approach would be to add a serializer field that accesses an @Property of your model, but this is more about decoupling serializers and models.
We will soon write a documentation and examples.
First off, awesome library. It does almost exactly how I've been looking to fix DRF permissions for myself for awhile.
My one question/thought is... This implementation is heavily coupled to the idea that a permission allows a user to access (or not access) a certain field on a certain model. However, there are definitely cases where what is really desired is restricting access to a certain serializer field for a user. Is this a use case you'd be interested in supporting?
The text was updated successfully, but these errors were encountered: