mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
add django-guardian, djangorestframework-guardian
This commit is contained in:
@@ -171,6 +171,7 @@ INSTALLED_APPS = [
|
||||
"rest_framework.authtoken",
|
||||
"django_filters",
|
||||
"django_celery_results",
|
||||
"guardian",
|
||||
] + env_apps
|
||||
|
||||
if DEBUG:
|
||||
@@ -276,6 +277,7 @@ if ENABLE_HTTP_REMOTE_USER:
|
||||
AUTHENTICATION_BACKENDS = [
|
||||
"django.contrib.auth.backends.RemoteUserBackend",
|
||||
"django.contrib.auth.backends.ModelBackend",
|
||||
"guardian.backends.ObjectPermissionBackend",
|
||||
]
|
||||
REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"].append(
|
||||
"rest_framework.authentication.RemoteUserAuthentication",
|
||||
|
Reference in New Issue
Block a user