#19412: Document that custom user models require a `user_permissions` M2M
---------------------------------+--------------------------------------
     Reporter:  cdestigter       |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Documentation    |                  Version:  1.5-beta-1
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  1                |      Needs documentation:  1
  Needs tests:  1                |  Patch needs improvement:  1
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by russellm):

 @ptone: I can see what you're driving at, but I'm not sure that's the
 right approach. Yes, the ModelBackend defines ``has_perm`` et al, but
 they're accessed via the permission methods on the User. If you've got a
 custom user, and you've added the methods that explicitly call the
 authentication backends looking for permissions, I think it's reasonable
 to assume that you've also installed all the plumbing to support those
 permissions calls (or that you've defined a custom auth backend that uses
 a different approach).

 I think the PermissionsMixin (a mixin that encapsulates all the
 user_permission bits into a single class) is a better approach -- this has
 been requested on django-dev anyway, and it ensures that if someone is
 going to be calling into ModelBackend, they've got all the pieces they
 need.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19412#comment:3>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to