mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-01 07:27:35 +00:00
perf: Cas user cannot bind organization
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user