no system page for non superuser

This commit is contained in:
vabene1111
2022-02-07 13:08:18 +01:00
parent 7dcc38b5b2
commit 39ca3ac1ad

View File

@@ -446,6 +446,9 @@ def history(request):
@group_required('admin')
def system(request):
if not request.user.is_superuser:
return HttpResponseRedirect(reverse('index'))
postgres = False if (
settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql_psycopg2' # noqa: E501
or settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql' # noqa: E501