summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-12 10:20:00 -0500
committerDan McGee <dan@archlinux.org>2010-09-12 10:20:00 -0500
commit51fca0c98db75629ff7dd26330ff40211554e6e6 (patch)
tree985d1177784d994a66fbef8f8cafc0ab441b0f44
parentfa4f5c15c886be04687764877a9e8f9e296143c1 (diff)
Check for correct permission when creating usersrelease_2010-09-12
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--devel/views.py4
1 files 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 @@ Password: %s""" % (domain, user.username, pw),
[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: