feat(chalice): force SSO for wrong user credentials

This commit is contained in:
Taha Yassine Kraiem 2023-02-07 15:48:45 +01:00
parent b73df744fc
commit 2f7bc2c926

View file

@ -740,6 +740,8 @@ def authenticate(email, password, for_change_password=False):
"email": email,
**r
}
if config("enforce_SSO", cast=bool, default=False) and helper.is_saml2_available():
return {"errors": ["must sign-in with SSO, enforced by admin"]}
return None