Skip to content

Commit

Permalink
admin social_auth_user
Browse files Browse the repository at this point in the history
  • Loading branch information
SkywalkerSpace committed Sep 25, 2024
1 parent 99bc315 commit 3094d22
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions seahub/api2/endpoints/admin/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,9 @@ def get(self, request):
users = all_ldap_users[start: start + per_page]

data = []
email_list = [user.email for user in users]
social_auth_user_queryset = SocialAuthUser.objects.filter(username__in=email_list)

for user in users:
profile = Profile.objects.get_profile_by_user(user.email)

Expand Down Expand Up @@ -775,6 +778,9 @@ def get(self, request):
else:
info['institution'] = ''

social_auth_user = social_auth_user_queryset.filter(username=user.email)
info['social_auth'] = [{'provider': item.provider, 'uid': item.uid} for item in social_auth_user]

data.append(info)

result = {'data': data, 'total_count': total_count}
Expand Down

0 comments on commit 3094d22

Please sign in to comment.