feat(api): EE hotfix

This commit is contained in:
Taha Yassine Kraiem 2021-11-16 13:17:59 +01:00
parent c847392b6c
commit 117da921c1

View file

@ -364,7 +364,11 @@ def process_invitation_link():
return {"errors": ["invitation not found"]}
if user["expiredInvitation"]:
return {"errors": ["expired invitation, please ask your admin to send a new one"]}
pass_token = users.allow_password_change(user_id=user["userId"])
if user["expiredChange"] is not None and not user["expiredChange"] \
and user["changePwdToken"] is not None and user["changePwdAge"] < -5 * 60:
pass_token = user["changePwdToken"]
else:
pass_token = users.allow_password_change(user_id=user["userId"])
return Response(
status_code=307,
body='',