mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #19851 from swordqiu/automated-cherry-pick-of-#19850-upstream-release-3.11
Automated cherry pick of #19850: fix: idp list query filter by sso_domain
This commit is contained in:
@@ -337,7 +337,7 @@ type IdentityProviderListInput struct {
|
||||
|
||||
// 过滤支持SSO的认证源,如果值为all,则列出所有的全局认证源,否则可出sso为域ID的域认证源
|
||||
// example: all
|
||||
SsoDomain string `json:"sso"`
|
||||
SsoDomain string `json:"sso_domain"`
|
||||
|
||||
AutoCreateProject *bool `json:"auto_create_project"`
|
||||
AutoCreateUser *bool `json:"auto_create_user"`
|
||||
|
||||
@@ -1163,7 +1163,10 @@ func (manager *SIdentityProviderManager) ListItemFilter(
|
||||
return nil, errors.Wrap(err, "FetchDomainByIdOrName")
|
||||
}
|
||||
}
|
||||
q = q.Equals("domain_id", ssoDomain.Id)
|
||||
q = q.Filter(sqlchemy.OR(
|
||||
sqlchemy.Equals(q.Field("domain_id"), ssoDomain.Id),
|
||||
sqlchemy.IsNullOrEmpty(q.Field("domain_id")),
|
||||
))
|
||||
}
|
||||
}
|
||||
if query.AutoCreateProject != nil {
|
||||
|
||||
Reference in New Issue
Block a user