mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
fixes authentication (#9)
This commit is contained in:
parent
78914962ed
commit
bdbc6361b9
1 changed files with 18 additions and 17 deletions
|
@ -35,12 +35,13 @@ def authenticate(redirect_url=None):
|
|||
# propose him a link to the creation form.
|
||||
create_project = project_id
|
||||
|
||||
else:
|
||||
# if credentials are already in session, redirect
|
||||
if project_id in session and project.password == session[project_id]:
|
||||
return redirect(redirect_url)
|
||||
|
||||
# else process the form
|
||||
if project and request.method == "POST":
|
||||
if request.method == "POST":
|
||||
if form.validate():
|
||||
if not form.password.data == project.password:
|
||||
form.errors['password'] = ["The password is not the right one"]
|
||||
|
|
Loading…
Reference in a new issue