mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-09 11:19:08 +00:00
fix(users): 修复用户在不同组织引起的问题
This commit is contained in:
@@ -560,12 +560,6 @@ class User(AuthMixin, TokenMixin, RoleMixin, MFAMixin, AbstractUser):
|
||||
|
||||
@property
|
||||
def groups_display(self):
|
||||
if hasattr(self, 'gc_groups__name'):
|
||||
names = self.gc_groups__name
|
||||
if isinstance(names, str):
|
||||
return ' '.join(set(self.gc_groups__name.split(',')))
|
||||
else:
|
||||
return ''
|
||||
return ' '.join([group.name for group in self.groups.all()])
|
||||
|
||||
@property
|
||||
|
Reference in New Issue
Block a user