Api changes (#124)

* feat(api): include smtp flag in login response

* feat(api): changed smtp flag in login response

* feat(api): owner role is not allowed to change

* feat(api): changed chalice template

* feat(api): reset password invitation|token
This commit is contained in:
Kraiem Taha Yassine 2021-08-05 16:00:37 +02:00 committed by GitHub
parent 5deb9b7260
commit e48c6c2aa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -380,7 +380,7 @@ def change_password_by_invitation():
data = app.current_request.json_body
if data is None or len(data.get("invitation", "")) < 64 or len(data.get("pass", "")) < 8:
return {"errors": ["please provide a valid invitation & pass"]}
user = users.get_by_invitation_token(token=data["token"], pass_token=data["pass"])
user = users.get_by_invitation_token(token=data["invitation"], pass_token=data["pass"])
if user is None:
return {"errors": ["invitation not found"]}
if user["expiredChange"]: