From 51fca0c98db75629ff7dd26330ff40211554e6e6 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 12 Sep 2010 10:20:00 -0500 Subject: Check for correct permission when creating users Signed-off-by: Dan McGee --- devel/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devel/views.py b/devel/views.py index 37037670..c974806e 100644 --- a/devel/views.py +++ b/devel/views.py @@ -1,6 +1,6 @@ from django import forms from django.http import HttpResponseRedirect -from django.contrib.auth.decorators import login_required, user_passes_test +from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.mail import send_mail @@ -117,7 +117,7 @@ def save(self): [user.email], fail_silently=False) -@user_passes_test(lambda u: u.is_superuser) +@permission_required('auth.add_user') @never_cache def new_user_form(request): if request.POST: -- cgit v1.2.3-54-g00ecf