fix: 修复同名用户登录时username设置问题

This commit is contained in:
Bai
2023-02-10 15:56:47 +08:00
committed by Jiangjie.Bai
parent ab132e02d0
commit 5153817ff4
3 changed files with 6 additions and 3 deletions

View File

@@ -247,8 +247,11 @@ class ConnectionTokenViewSet(ExtraActionApiMixin, RootOrgViewMixin, JMSModelView
account = self._validate_perm(user, asset, account_name)
if account.has_secret:
data['input_secret'] = ''
if account.username != '@INPUT':
data['input_username'] = ''
if account.username == '@USER':
data['input_username'] = user.username
ticket = self._validate_acl(user, asset, account)
if ticket: