#25142: Refactor dispatch method in PermissionRequiredMixin to allow 
customisation
--------------------------------------+---------------------
     Reporter:  dfunckt               |      Owner:  dfunckt
         Type:  Cleanup/optimization  |     Status:  new
    Component:  contrib.auth          |    Version:  master
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  1                     |      UI/UX:  0
--------------------------------------+---------------------
 Extending from PermissionRequiredMixin to implement a mixin for checking
 for *object* permissions means that you can't call super in .dispatch
 because PermissionRequiredMixin will do another check for model-level
 permissions.

 I propose to delegate the check for permissions in
 PermissionRequiredMixin.dispatch to an instance method. This way, we are
 able to provide a hook for code to check for object permissions without
 having to re-implement the whole class.

 PR coming shortly.

--
Ticket URL: <https://code.djangoproject.com/ticket/25142>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.fbafa7b07fb311cebf7f30101ee2eb78%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to