#37021: Add a helper function to return the permission string representation to 
be
used with `user.has_perm()`
-------------------------------------+-------------------------------------
     Reporter:  Mariatta             |                    Owner:  Mariatta
         Type:  New feature          |                   Status:  closed
    Component:  contrib.auth         |                  Version:  6.0
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  codename, has_perm   |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):

 I just figured we'd use this new property if someone implemented accepting
 Permissions directly. But I see your PR inlines the string interpolation
 in `has_perm()`. I was assuming we had other methods in builtin backends
 (and thus 3rd party backends as well) that would find the property useful?

 
https://github.com/django/django/blob/e2abe321a6f1370e05c1a89a742125c9eafcac8c/django/contrib/auth/backends.py#L121

 (Ah, but looking at that example, it uses `values_list()`.)
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37021#comment:13>
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 visit 
https://groups.google.com/d/msgid/django-updates/0107019d6a5733f3-208a1cb6-34ed-46cf-91ce-e5903e87969d-000000%40eu-central-1.amazonses.com.

Reply via email to