Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/onyx/auth/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ async def create(
db_session, User, OAuthAccount
)
self.user_db = tenant_user_db
self.database = tenant_user_db # is this even a real var?

if hasattr(user_create, "role"):
user_create.role = UserRole.BASIC
Expand Down Expand Up @@ -415,12 +414,13 @@ async def oauth_callback(
verify_email_in_whitelist(account_email, tenant_id)
verify_email_domain(account_email)

# NOTE(rkuo): If this UserManager is instantiated per connection
# should we even be doing this here?
if MULTI_TENANT:
tenant_user_db = SQLAlchemyUserAdminDB[User, uuid.UUID](
db_session, User, OAuthAccount
)
self.user_db = tenant_user_db
self.database = tenant_user_db

oauth_account_dict = {
"oauth_name": oauth_name,
Expand Down
Loading