From f45a9e511240eb12945dd55f4178680dcd17e64a Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Thu, 2 Dec 2021 20:31:37 +0100 Subject: [PATCH] feat(api): changed reset password EE --- ee/api/.chalice/config.json | 1 + ee/api/chalicelib/core/users.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ee/api/.chalice/config.json b/ee/api/.chalice/config.json index 691429329..71548c9ce 100644 --- a/ee/api/.chalice/config.json +++ b/ee/api/.chalice/config.json @@ -61,6 +61,7 @@ "idp_sso_url": "", "idp_x509cert": "", "idp_sls_url": "", + "idp_name": "", "invitation_link": "/api/users/invitation?token=%s", "change_password_link": "/reset-password?invitation=%s&&pass=%s", "iosBucket": "openreplay-ios-images", diff --git a/ee/api/chalicelib/core/users.py b/ee/api/chalicelib/core/users.py index baed9e487..a6584385d 100644 --- a/ee/api/chalicelib/core/users.py +++ b/ee/api/chalicelib/core/users.py @@ -337,7 +337,8 @@ def get_by_email_only(email): (CASE WHEN users.role = 'owner' THEN TRUE ELSE FALSE END) AS super_admin, (CASE WHEN users.role = 'admin' THEN TRUE ELSE FALSE END) AS admin, (CASE WHEN users.role = 'member' THEN TRUE ELSE FALSE END) AS member, - origin + origin, + basic_authentication.password IS NOT NULL AS has_password FROM public.users LEFT JOIN public.basic_authentication ON users.user_id=basic_authentication.user_id WHERE users.email = %(email)s AND users.deleted_at IS NULL