Explorar el Código

Set request variable when using LDAP authentication

- request variable must be set when python version is 3
- Fix #2429
byungnam hace 4 años
padre
commit
65602ea360
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      desktop/core/src/desktop/auth/forms.py

+ 2 - 0
desktop/core/src/desktop/auth/forms.py

@@ -207,6 +207,8 @@ class LdapAuthenticationForm(AuthenticationForm):
 
   def authenticate(self):
     request = None
+    if sys.version_info[0] > 2:
+      request = self.request
     username = self.cleaned_data.get('username') or ''
     password = self.cleaned_data.get('password')
     server = self.cleaned_data.get('server')