#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 Adam Johnson):

 Hey, not to discourage here, but there was a lot of support for the
 alternative suggestion in the new-features discussion:
 https://github.com/django/new-features/issues/137#issuecomment-4182093695
 . The alternative is to extend `User.has_perm()` to accept `Permission`
 objects directly, so users don't need to think about formatting at all.

 Here’s a PoC PR with some tests;
 https://github.com/django/django/pull/21071

 I think this is a better approach, and we could look into rolling back the
 new property in favour of it…
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37021#comment:11>
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/0107019d6a254b0c-68ad19cd-28d9-4f0e-afd4-5c4934465720-000000%40eu-central-1.amazonses.com.

Reply via email to