aboutsummaryrefslogtreecommitdiffstats
path: root/manager
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2024-01-27 18:06:05 +0100
committerAndrea Lepori <alepori@student.ethz.ch>2024-01-27 18:06:05 +0100
commit63874cf9820ee82050d3d11ba12212c197821fcd (patch)
tree676ad52e31e5dc3d3ca17ab09e9712a34ed7a1af /manager
parentupdate group of docs when type changes (diff)
downloadscout-subs-63874cf9820ee82050d3d11ba12212c197821fcd.tar.gz
scout-subs-63874cf9820ee82050d3d11ba12212c197821fcd.zip
add impersonation
Diffstat (limited to '')
-rw-r--r--manager/settings.py8
-rw-r--r--manager/urls.py1
2 files changed, 8 insertions, 1 deletions
diff --git a/manager/settings.py b/manager/settings.py
index c2ffdf6..e145e45 100644
--- a/manager/settings.py
+++ b/manager/settings.py
@@ -66,6 +66,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
+ 'impersonate',
]
MIDDLEWARE = [
@@ -76,6 +77,7 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
+ 'impersonate.middleware.ImpersonateMiddleware',
]
AUTHLIB_OAUTH_CLIENTS = {
@@ -174,4 +176,8 @@ STATICFILES_DIRS = [
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/'
-FQD_BASE_URL = 'http://127.0.0.1:8000' \ No newline at end of file
+FQD_BASE_URL = 'http://127.0.0.1:8000'
+
+# Impersonate settings
+REQUIRE_SUPERUSER = True
+ALLOW_SUPERUSER = False \ No newline at end of file
diff --git a/manager/urls.py b/manager/urls.py
index f3b8008..beaefbe 100644
--- a/manager/urls.py
+++ b/manager/urls.py
@@ -23,6 +23,7 @@ urlpatterns = [
path('accounts/', include('accounts.urls')),
path('accounts/', include('django.contrib.auth.urls')),
path('admin/', admin.site.urls),
+ path('impersonate/', include('impersonate.urls')),
]
if settings.DEBUG: