Bläddra i källkod

[core] Call super() in HueRemoteUserMiddleware

After deploying Hue 4.9 I got the following error:

AttributeError: 'HueRemoteUserMiddleware' object has no attribute 'get_response'

I have Hue set up with
backend=desktop.auth.backend.RemoteUserDjangoBackend, httpd is in front
of it with Apereo Cas and passes the username as part of a remote
header.

HueRemoteUserMiddleware inherits from RemoteUserMiddleware, that with
Django 2.x inherits from MiddlewareMixin, that requires get_response.
Luca Toscano 4 år sedan
förälder
incheckning
9e5039cb8b
1 ändrade filer med 1 tillägg och 0 borttagningar
  1. 1 0
      desktop/core/src/desktop/middleware.py

+ 1 - 0
desktop/core/src/desktop/middleware.py

@@ -809,6 +809,7 @@ class HueRemoteUserMiddleware(RemoteUserMiddleware):
     if not 'desktop.auth.backend.RemoteUserDjangoBackend' in AUTH.BACKEND.get():
       LOG.info('Unloading HueRemoteUserMiddleware')
       raise exceptions.MiddlewareNotUsed
+    super().__init__(get_response)
     self.header = AUTH.REMOTE_USER_HEADER.get()