#24032: use has_permission instead of explicit is_staff for AdminSite
-------------------------------+--------------------------------------
Reporter: tanner | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by tanner):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 1
Old description:
> AdminSite currently requires users to have is_staff explicitly set in
> order to login, i.e. only staff members can login.
> The way it is hardcoded in AdminSite and its templates makes it difficult
> to create custom AdminSites which allow certain non-staff members (e.g.
> with special permissions) to login.
>
> With this PR, custom AdminSites only need to override has_permission and
> login_form to change the login requirements.
New description:
AdminSite currently requires users to have is_staff explicitly set in
order to login, i.e. only staff members can login.
The way it is hardcoded in AdminSite and its templates makes it difficult
to create custom AdminSites which allow certain non-staff members (e.g.
with special permissions) to login.
With this PR, custom AdminSites only need to override has_permission and
login_form to change the login requirements.
PR: https://github.com/django/django/pull/3762
--
--
Ticket URL: <https://code.djangoproject.com/ticket/24032#comment:1>
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/064.2da61ee39de8258f1e141261a42f2ba5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.