mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-15 12:46:34 +08:00
修复服务访问控制页面可能空白的问题
This commit is contained in:
@@ -36,18 +36,20 @@ func (this *IndexAction) RunGet(params struct {
|
|||||||
allTypes = append(allTypes, def.Code)
|
allTypes = append(allTypes, def.Code)
|
||||||
}
|
}
|
||||||
|
|
||||||
var refs = webConfig.Auth.PolicyRefs
|
if webConfig.Auth != nil {
|
||||||
var realRefs = []*serverconfigs.HTTPAuthPolicyRef{}
|
var refs = webConfig.Auth.PolicyRefs
|
||||||
for _, ref := range refs {
|
var realRefs = []*serverconfigs.HTTPAuthPolicyRef{}
|
||||||
if ref.AuthPolicy == nil {
|
for _, ref := range refs {
|
||||||
continue
|
if ref.AuthPolicy == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if !lists.ContainsString(allTypes, ref.AuthPolicy.Type) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
realRefs = append(realRefs, ref)
|
||||||
}
|
}
|
||||||
if !lists.ContainsString(allTypes, ref.AuthPolicy.Type) {
|
webConfig.Auth.PolicyRefs = realRefs
|
||||||
continue
|
|
||||||
}
|
|
||||||
realRefs = append(realRefs, ref)
|
|
||||||
}
|
}
|
||||||
webConfig.Auth.PolicyRefs = realRefs
|
|
||||||
|
|
||||||
this.Data["authConfig"] = webConfig.Auth
|
this.Data["authConfig"] = webConfig.Auth
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user