perf: Cas user cannot bind organization

pull/14309/head
feng 1 month ago committed by ZhaoJiSen
parent 35d6b0f16a
commit 2a781c228f

@ -53,10 +53,11 @@ def user_authenticated_handle(user, created, source, attrs=None, **kwargs):
user.source = source user.source = source
user.save() user.save()
if created and isinstance(attrs, dict): if created:
org_ids = bind_user_to_org_role(user) org_ids = bind_user_to_org_role(user)
group_names = attrs.get('groups') if isinstance(attrs, dict):
bind_user_to_group(org_ids, group_names, user) group_names = attrs.get('groups')
bind_user_to_group(org_ids, group_names, user)
if not attrs: if not attrs:
return return

Loading…
Cancel
Save