Skip to content
Snippets Groups Projects
Verified Commit 0c85fdad authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Enable impersonation through django-impersonate. Advances #63.

parent 54f58eac
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,7 @@ INSTALLED_APPS = [
'settings_context_processor',
'sass_processor',
'easyaudit',
'impersonate',
'bootstrap4',
'fa',
'django_any_js',
......@@ -90,6 +91,7 @@ MIDDLEWARE = [
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'impersonate.middleware.ImpersonateMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'easyaudit.middleware.easyaudit.EasyAuditMiddleware',
......@@ -274,4 +276,10 @@ MAINTENANCE_MODE_IGNORE_IP_ADDRESSES = _settings.get(
MAINTENANCE_MODE_GET_CLIENT_IP_ADDRESS = 'ipware.ip.get_ip'
MAINTENANCE_MODE_IGNORE_SUPERUSER = True
IMPERSONATE = {
'USE_HTTP_REFERER': True,
'REQUIRE_SUPERUSER': True,
'ALLOW_SUPERUSER': True
}
_settings.populate_obj(sys.modules[__name__])
......@@ -27,6 +27,7 @@ urlpatterns = [
path('', views.index, name='index'),
path('maintenance-mode/', include('maintenance_mode.urls')),
path('contact/', include('contact_form.urls')),
path('impersonate/', include('impersonate.urls')),
path('__i18n__/', include('django.conf.urls.i18n'))
]
......
......@@ -43,6 +43,7 @@ django-ipware = "^2.1"
easy-thumbnails = "^2.6"
django-image-cropping = "^1.2"
django-contact-form = "^1.7"
django-impersonate = "^1.4"
[tool.poetry.extras]
ldap = ["django-auth-ldap"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment