#25142: Refactor access mixins to allow customisation
--------------------------------------+------------------------------------
     Reporter:  dfunckt               |                    Owner:  dfunckt
         Type:  Cleanup/optimization  |                   Status:  assigned
    Component:  contrib.auth          |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  1                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by dfunckt):

 * needs_docs:  1 => 0
 * needs_tests:  1 => 0


Comment:

 Unfortunately turns out we can't refactor all mixins to implement
 {{{AccessMixin.has_permission}}}, because it would forbid stacking them --
 [https://github.com/django/django/blob/master/docs/topics/auth/default.txt#L621
 docs warn about this] and explain why that would be the case.

 I reverted to the initial patch which allows PermissionRequiredMixin to be
 used as a base class to easily implement an object permissions mixin.

--
Ticket URL: <https://code.djangoproject.com/ticket/25142#comment:14>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.316ccdb8d79842704bf45d898b2e683e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to