Skip to content

Commit f534465

Browse files
Luke TuiteLuke Tuite
authored andcommitted
Through admin, superusers can now "hijack" users and work as them
1 parent a6813b5 commit f534465

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

bil_site/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585
'django_filters',
8686
'bootstrap4',
8787
'django_pam',
88+
'hijack',
89+
'hijack.contrib.admin',
8890
#'core',
8991
]
9092

@@ -96,6 +98,7 @@
9698
'django.contrib.auth.middleware.AuthenticationMiddleware',
9799
'django.contrib.messages.middleware.MessageMiddleware',
98100
'django.middleware.clickjacking.XFrameOptionsMiddleware',
101+
'hijack.middleware.HijackUserMiddleware',
99102
]
100103

101104
ROOT_URLCONF = 'bil_site.urls'

bil_site/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@
2525
path('admin/', admin.site.urls),
2626
path('accounts/', include('django.contrib.auth.urls')),
2727
path('', RedirectView.as_view(url='/ingest/')),
28+
path('hijack/', include('hijack.urls')),
2829
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

0 commit comments

Comments
 (0)