Permalink
Browse files

Allow all staff users (= admin login users) to purge things from varnish

Previously we required superuser, but that seems a bit excessive. We could
limit it based on specific groups, but for now, we'll allow all staff users.
  • Loading branch information...
1 parent 2025796 commit 3442fdde57123f89234a29404d58fe72ba491941 @mhagander committed Mar 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 pgweb/core/views.py
View
@@ -176,7 +176,7 @@ def admin_pending(request):
# Purge objects from varnish, for the admin pages
@login_required
-@user_passes_test(lambda u: u.is_superuser)
+@user_passes_test(lambda u: u.is_staff)
def admin_purge(request):
if request.method == 'POST':
url = request.POST['url']

0 comments on commit 3442fdd

Please sign in to comment.