mirror of
https://github.com/django/django.git
synced 2025-07-18 16:49:13 +00:00
[1.0.X] Fixed #10694: correctly check permissions in the change password admin. Thanks, jturnbull. Backport of r10591 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
283442a50e
commit
f0e7dca9d1
@ -90,7 +90,7 @@ class UserAdmin(admin.ModelAdmin):
|
|||||||
}, context_instance=template.RequestContext(request))
|
}, context_instance=template.RequestContext(request))
|
||||||
|
|
||||||
def user_change_password(self, request, id):
|
def user_change_password(self, request, id):
|
||||||
if not request.user.has_perm('auth.change_user'):
|
if not self.has_change_permission(request):
|
||||||
raise PermissionDenied
|
raise PermissionDenied
|
||||||
user = get_object_or_404(self.model, pk=id)
|
user = get_object_or_404(self.model, pk=id)
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user