#18763: Shortcut to get users by permission
------------------------------+------------------------------------
Reporter: shelldweller | Owner: Osmose
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 slurms):
Moved with_perm checking to the authentication backends. Current strategy
is to use the top-most backend that defines `with_perm`.
`django.contrib.auth.backends.ModelBackend` falls back to checking the
same as was previously on the `UserManager`. This allows custom
authentication backends to specify their own behaviour for `with_perm`,
that takes `obj` into account.
It is now possible to do `User.objects.with_perm('can_delete', obj)` along
with `User.objects.with_perm('can_delete').
Pull request here: https://github.com/django/django/pull/2951
--
Ticket URL: <https://code.djangoproject.com/ticket/18763#comment:9>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.5957cd421816f8106b11201ee1266a26%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.