修复无法读取鉴权方法列表的问题

This commit is contained in:
刘祥超
2023-07-17 09:33:19 +08:00
parent 49ea05c890
commit 8e38cb2149
2 changed files with 4 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ package access
import (
"encoding/json"
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
"github.com/TeaOSLab/EdgeAdmin/internal/utils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
@@ -23,7 +24,7 @@ func (this *CreatePopupAction) Init() {
}
func (this *CreatePopupAction) RunGet(params struct{}) {
this.Data["authTypes"] = serverconfigs.FindAllHTTPAuthTypes()
this.Data["authTypes"] = serverconfigs.FindAllHTTPAuthTypes(teaconst.Role)
this.Show()
}

View File

@@ -5,6 +5,7 @@ package access
import (
"encoding/json"
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
"github.com/TeaOSLab/EdgeAdmin/internal/utils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
@@ -26,7 +27,7 @@ func (this *UpdatePopupAction) Init() {
func (this *UpdatePopupAction) RunGet(params struct {
PolicyId int64
}) {
this.Data["authTypes"] = serverconfigs.FindAllHTTPAuthTypes()
this.Data["authTypes"] = serverconfigs.FindAllHTTPAuthTypes(teaconst.Role)
policyResp, err := this.RPC().HTTPAuthPolicyRPC().FindEnabledHTTPAuthPolicy(this.AdminContext(), &pb.FindEnabledHTTPAuthPolicyRequest{HttpAuthPolicyId: params.PolicyId})
if err != nil {