mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-04 21:58:54 -05:00
no system page for non superuser
This commit is contained in:
@@ -446,6 +446,9 @@ def history(request):
|
|||||||
|
|
||||||
@group_required('admin')
|
@group_required('admin')
|
||||||
def system(request):
|
def system(request):
|
||||||
|
if not request.user.is_superuser:
|
||||||
|
return HttpResponseRedirect(reverse('index'))
|
||||||
|
|
||||||
postgres = False if (
|
postgres = False if (
|
||||||
settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql_psycopg2' # noqa: E501
|
settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql_psycopg2' # noqa: E501
|
||||||
or settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql' # noqa: E501
|
or settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql' # noqa: E501
|
||||||
|
|||||||
Reference in New Issue
Block a user