Browse Source

Set request variable when using LDAP authentication

- request variable must be set when python version is 3
- Fix #2429
byungnam 4 years ago
parent
commit
65602ea360
1 changed files with 2 additions and 0 deletions
  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')