#30226: Simplify authentication backend interface
------------------------------------------------+------------------------
               Reporter:  Tobias Bengfort       |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  contrib.auth          |        Version:  2.1
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  1
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 Currently, writing a new authentication backend requires quite some
 boilerplate e.g. `has_perm()` can be derived from `get_all_permissions()`
 which in turn can be derived from `get_user_permissions()` and
 `get_group_permissions()`. Additionally, `authenticate()` and `get_user()`
 should always return `None` for backends that only handle permissions.

 Also note that `get_all_permissions()` and `get_group_permissions()` exist
 on the User model, but `get_user_permissions()` does not. I think this is
 confisuing for backend authors.

 Mailinglist thread: https://groups.google.com/forum/#!topic/django-
 developers/CNmz22gEsCc
 Pull request: https://github.com/django/django/pull/11037

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30226>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/045.d07b5b28da4347e38a310ffec8cb83e3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to