[Bugfix] 修复动态系统用户返回auth info的bug

This commit is contained in:
ibuler
2020-03-16 16:59:45 +08:00
parent 02a901467b
commit c91ce2b99f
2 changed files with 11 additions and 5 deletions

View File

@@ -158,11 +158,10 @@ class SystemUser(BaseUser):
def can_perm_to_asset(self):
return self.protocol not in [self.PROTOCOL_MYSQL]
def load_asset_special_auth(self, asset=None, username=None):
instance = super().load_asset_special_auth(asset=asset, username=username)
def _merge_auth(self, other):
super()._merge_auth(other)
if self.username_same_with_user:
instance.username = username
return instance
self.username = other.username
@property
def cmd_filter_rules(self):