mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-15 21:34:46 +00:00
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.
This commit is contained in:
@ -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']
|
||||
|
Reference in New Issue
Block a user