Add user when they interact outside of UI (e.g. Slack bot) (#2369)

* Add user when they interact outside of UI (e.g. Slack bot)

* fix mypy errors

* don't use user manager to avoid async messiness

* fix email is none scenario

* fix mypy

* make code slightly clearer

* PR comments

* get slack email in generate button as well

* fix alembic migration

* update name to be more descriptive

---------

Co-authored-by: Hyeong Joon Suh <hyeongjoonsuh@Hyeongs-MacBook-Pro.local>
This commit is contained in:
hj-danswer
2024-09-09 13:21:31 -07:00
committed by GitHub
parent c967f53c02
commit e4e4765c60
12 changed files with 130 additions and 9 deletions

View File

@@ -65,6 +65,7 @@ async def upsert_saml_user(email: str) -> User:
password=hashed_pass,
is_verified=True,
role=role,
has_web_login=True,
)
)