[Django] #29686: contrib.auth.admin - user_change_password() method send object to has_change_permission()

2 views
Skip to first unread message

Django

unread,
Aug 17, 2018, 3:55:16 PM8/17/18
to django-...@googlegroups.com
#29686: contrib.auth.admin - user_change_password() method send object to
has_change_permission()
---------------------------------------------+------------------------
Reporter: Alexander Todorov | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
Ticket for https://github.com/django/django/pull/10253.


This makes overriding user_change_password() and mangling permissions
easier because we have access to the object.

For example when you'd like to use the admin panel to allow users to
change their own passwords but not see the list of all users or anything
else.

--
Ticket URL: <https://code.djangoproject.com/ticket/29686>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 17, 2018, 4:22:51 PM8/17/18
to django-...@googlegroups.com
#29686: Make UserAdmin.user_change_password() pass object to
has_change_permission()
--------------------------------------+------------------------------------

Reporter: Alexander Todorov | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.auth | Version: 2.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* has_patch: 0 => 1
* type: New feature => Cleanup/optimization
* stage: Unreviewed => Accepted


Old description:

> Ticket for https://github.com/django/django/pull/10253.
>

> This makes overriding user_change_password() and mangling permissions
> easier because we have access to the object.
>
> For example when you'd like to use the admin panel to allow users to
> change their own passwords but not see the list of all users or anything
> else.

New description:

This makes overriding `user_change_password()` and mangling permissions
easier because we have access to the object.

For example when you'd like to use the admin panel to allow users to
change their own passwords but not see the list of all users or anything
else.

[https://github.com/django/django/pull/10253 PR]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/29686#comment:1>

Django

unread,
Aug 17, 2018, 5:43:39 PM8/17/18
to django-...@googlegroups.com
#29686: Make UserAdmin.user_change_password() pass object to
has_change_permission()
--------------------------------------+------------------------------------
Reporter: Alexander Todorov | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.auth | Version: 2.1
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"53ebd4cb1397145d11a54e2c1dd83b63fc337097" 53ebd4cb]:
{{{
#!CommitTicketReference repository=""
revision="53ebd4cb1397145d11a54e2c1dd83b63fc337097"
Fixed #29686 -- Made UserAdmin.user_change_password() pass user to
has_change_permission().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29686#comment:2>

Reply all
Reply to author
Forward
0 new messages