mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 00:57:09 +01:00
add django-guardian, djangorestframework-guardian
This commit is contained in:
parent
c0bccc6a95
commit
dbaa606a9f
9 changed files with 183 additions and 25 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue