[Fixed]-Django permissions: Access to only one view method among many

1👍

Django’s permissions might or not be the right way to tell if a given user can access a given view, but you don’t tell enough about the context.

But Anyway… There are mainly two solutions here: either decorate each and every view with the appropriate user_passes_test(yourtesthere) or permission_required(perm) decorator, or use a custom middleware with the process_view method.

Leave a comment