Merge: v3 to dev (#9160)

* fix: 修改 ConnectionTokenSecretSerializer

* perf: connect token secret (#9155)

Co-authored-by: feng <1304903146@qq.com>
Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>

* feat: 作业迁移至个人级别

* perf: asset enabled (#9157)

Co-authored-by: feng <1304903146@qq.com>

* perf: 修改ConnectionTokenSecret Gateway数据结构; 修改Domain Gateway Model方法

* perf: ConnectionTokenSecret  返回 domain 信息

* refactor: 移动 Gateway Model 到 asset 目录下

* refactor: 移动 Gateway Model 单独到 gateway 文件中

* perf: 修改 GatewaySerializer 目录

* perf: 修改 GatewaySerializer 目录

Co-authored-by: fit2bot <68588906+fit2bot@users.noreply.github.com>
Co-authored-by: feng <1304903146@qq.com>
Co-authored-by: Aaron3S <chenyang@fit2cloud.com>
This commit is contained in:
Jiangjie.Bai
2022-12-06 11:03:14 +08:00
committed by GitHub
parent 9ef5f17d5e
commit 7842e3e5ab
23 changed files with 284 additions and 243 deletions

View File

@@ -153,7 +153,7 @@ class ConnectionToken(OrgModelMixin, JMSBaseModel):
if not self.domain:
return
self.domain: Domain
return self.domain.random_gateway()
return self.domain.select_gateway()
@lazyproperty
def command_filter_acls(self):
@@ -161,7 +161,7 @@ class ConnectionToken(OrgModelMixin, JMSBaseModel):
kwargs = {
'user': self.user,
'asset': self.asset,
'account': self.account,
'account': self.account_object,
}
acls = CommandFilterACL.filter_queryset(**kwargs).valid()
return acls