diff options
author | Dan McGee <dan@archlinux.org> | 2010-09-12 17:20:00 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-09-12 17:20:00 +0200 |
commit | 51fca0c98db75629ff7dd26330ff40211554e6e6 (patch) | |
tree | 985d1177784d994a66fbef8f8cafc0ab441b0f44 /devel | |
parent | fa4f5c15c886be04687764877a9e8f9e296143c1 (diff) | |
download | archweb-51fca0c98db75629ff7dd26330ff40211554e6e6.tar.gz archweb-51fca0c98db75629ff7dd26330ff40211554e6e6.tar.xz |
Check for correct permission when creating users
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r-- | devel/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/devel/views.py b/devel/views.py index 3703767..c974806 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: |