#33299: Add @request_passes_test decorator.
-------------------------------------+-------------------------------------
     Reporter:  Iago González        |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  contrib.auth         |                  Version:  3.2
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  user_passes_test,    |             Triage Stage:
  request, Auth                      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * needs_better_patch:  1 => 0
 * resolution:   => wontfix
 * needs_tests:  1 => 0


Comment:

 > The `user_passes_test` is a little bit limited when used for restricting
 the views.

 Thanks for this ticket, however I wouldn't say it's limited. It works as
 documented and intended, `user_passes_test` checks whether an user passes
 test or not.

 This is a proposition to add a new decorator that will do the same but for
 a request. I don't see a particular need to include this with Django. It
 won't be used by Django itself, and can be implemented in your project if
 you need it.

 Please first start a discussion on the DevelopersMailingList, where you'll
 reach a wider audience and see what other think, and
 [https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
 features/#requesting-features follow the guidelines with regards to
 requesting features].

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33299#comment:2>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.9fae20e3ad2388608bd0fdbb85924bf3%40djangoproject.com.

Reply via email to