Переглянути джерело

HUE-7743 [core] Automatically use Impersonation backend when in embedded mode

Romain Rigaux 7 роки тому
батько
коміт
6ca38e0
1 змінених файлів з 2 додано та 0 видалено
  1. 2 0
      desktop/core/src/desktop/settings.py

+ 2 - 0
desktop/core/src/desktop/settings.py

@@ -384,6 +384,8 @@ TIME_ZONE = desktop.conf.TIME_ZONE.get()
 
 if desktop.conf.DEMO_ENABLED.get():
   AUTHENTICATION_BACKENDS = ('desktop.auth.backend.DemoBackend',)
+elif desktop.conf.IS_EMBEDDED.get():
+  AUTHENTICATION_BACKENDS = ('desktop.auth.backend.ImpersonationBackend',)
 else:
   AUTHENTICATION_BACKENDS = tuple(desktop.conf.AUTH.BACKEND.get())