Merge pull request #14126 from jumpserver/pr@dev@third_party_user_login_failed

perf: Third-party user login failed
pull/14127/head
ZhaoJiSen 2024-09-12 10:23:05 +08:00 committed by GitHub
commit e319f20296
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,8 @@ def user_authenticated_handle(user, created, source, attrs=None, **kwargs):
if created:
user.source = source
user.save()
if created and isinstance(attrs, dict):
org_ids = bind_user_to_org_role(user)
group_names = attrs.get('groups')
bind_user_to_group(org_ids, group_names, user)