[日志审计]增加删除、清理和别的一些设置

This commit is contained in:
刘祥超
2020-12-02 20:31:42 +08:00
parent 86fef9153a
commit 81681f415d
28 changed files with 485 additions and 78 deletions

View File

@@ -2,7 +2,7 @@ package security
import (
"encoding/json"
"github.com/TeaOSLab/EdgeAdmin/internal/securitymanager"
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/actions"
@@ -18,7 +18,7 @@ func (this *IndexAction) Init() {
}
func (this *IndexAction) RunGet(params struct{}) {
config, err := securitymanager.LoadSecurityConfig()
config, err := configloaders.LoadSecurityConfig()
if err != nil {
this.ErrorPage(err)
return
@@ -75,7 +75,7 @@ func (this *IndexAction) RunPost(params struct {
}) {
defer this.CreateLogInfo("修改管理界面安全设置")
config, err := securitymanager.LoadSecurityConfig()
config, err := configloaders.LoadSecurityConfig()
if err != nil {
this.ErrorPage(err)
return
@@ -109,7 +109,7 @@ func (this *IndexAction) RunPost(params struct {
// 允许本地
config.AllowLocal = params.AllowLocal
err = securitymanager.UpdateSecurityConfig(config)
err = configloaders.UpdateSecurityConfig(config)
if err != nil {
this.ErrorPage(err)
return