It would be useful if DRYPermissionsField could return permission not only for the object itself, but also related objects. Currently, you can use additional_actions to specify additional permissions to return, e.g. I have a model BookingAvailability where I'm including some additional permissions:
Where booking.make_cancelled refers to the make_cancelled permission of the related Booking (BookingAvailability has a ForeginKey relationship to a Booking).
This would be very similar to how other serializer fields (like DRF's CharField) are able to use related objects, for example:
It would be useful if
DRYPermissionsField
could return permission not only for the object itself, but also related objects. Currently, you can useadditional_actions
to specify additional permissions to return, e.g. I have a modelBookingAvailability
where I'm including some additional permissions:It would be good if I could also do the following:
Where
booking.make_cancelled
refers to themake_cancelled
permission of the relatedBooking
(BookingAvailability
has aForeginKey
relationship to aBooking
).This would be very similar to how other serializer fields (like DRF's
CharField
) are able to use related objects, for example:Where
booking_title
will be thetitle
of the relatedBooking
.