mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-10 20:00:10 +00:00
[Update] 修改一些逻辑
This commit is contained in:
@@ -220,11 +220,10 @@ class User(AbstractUser):
|
||||
if self.username == 'admin':
|
||||
self.role = 'Admin'
|
||||
self.is_active = True
|
||||
instance = super().save(*args, **kwargs)
|
||||
super().save(*args, **kwargs)
|
||||
current_org = get_current_org()
|
||||
if current_org and current_org.is_real():
|
||||
instance.orgs.add(current_org)
|
||||
return instance
|
||||
self.orgs.add(current_org)
|
||||
|
||||
@property
|
||||
def private_token(self):
|
||||
|
Reference in New Issue
Block a user