Let project override user authentication for login page
This commit is contained in:
		
							parent
							
								
									49c9bbbbee
								
							
						
					
					
						commit
						4659d3473b
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -103,9 +103,8 @@ class AuthenticationView(View): | |||
| 
 | ||||
|         form = forms.SimpleForm(self.request, UserLogin) | ||||
|         if form.validate(): | ||||
|             user = authenticate_user(Session(), | ||||
|                                      form.data['username'], | ||||
|                                      form.data['password']) | ||||
|             user = self.authenticate_user(form.data['username'], | ||||
|                                           form.data['password']) | ||||
|             if user: | ||||
|                 # okay now they're truly logged in | ||||
|                 headers = remember(self.request, user.uuid) | ||||
|  | @ -121,6 +120,9 @@ class AuthenticationView(View): | |||
|             'dialog': mobile, | ||||
|         } | ||||
| 
 | ||||
|     def authenticate_user(self, username, password): | ||||
|         return authenticate_user(Session(), username, password) | ||||
| 
 | ||||
|     def mobile_login(self): | ||||
|         return self.login(mobile=True) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar