Browse Source

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

Romain Rigaux 7 năm trước cách đây
mục cha
commit
6ca38e0
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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())