FJNR-inc / dry-rest-permissions

Rules based permissions for the Django Rest Framework
ISC License
78 stars 11 forks source link

Custom authentication message #27

Closed f-batiri closed 11 months ago

f-batiri commented 2 years ago

Thanks for such a great framework. Works very well so far. Is there anyway to add custom message explaining why use does not have permission to access an action or object? (meaning change default "You do not have permission to perform this action.")

RignonNoel commented 2 years ago

Seems to be a great idea, and I share your frustration on this point. If somebody is motivated to propose an architecture we could try to implement that.

mjaquiery commented 1 year ago

I'd suggest that if a test returns a string it gets interpreted as a failure and the string is used as the exception description.

mjaquiery commented 11 months ago

This should now be closed by #30 :)