#24914: Include basic permission mixins into Django
------------------------------+------------------------------------
     Reporter:  raphaelm      |                    Owner:  MarkusH
         Type:  New feature   |                   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:  1
Easy pickings:  0             |                    UI/UX:  0
------------------------------+------------------------------------

Comment (by raphaelm):

 I don't really see an easy and obvious way to support stacking of
 ``UserPassesTestMixin``. You could either do something like

 {{{#!python
 class CheckOneMixin(UserPassesTestMixin):
     def test_func(self, user):
         return something_is_true_or_false and super().test_func()
 }}}

 or make the API more complex by allowing each subclass to set/append to a
 list of test functions in some way.

--
Ticket URL: <https://code.djangoproject.com/ticket/24914#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/066.5e4b2f19b507f9f05721420712cf829a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to