[系统用户]优化权限设置

This commit is contained in:
GoEdgeLab
2020-12-03 11:03:12 +08:00
parent f083575906
commit ee553a0234
82 changed files with 193 additions and 105 deletions

View File

@@ -1,6 +1,7 @@
package clusters
import (
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/clusterutils"
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
"github.com/iwind/TeaGo"
@@ -9,9 +10,8 @@ import (
func init() {
TeaGo.BeforeStart(func(server *TeaGo.Server) {
server.
Helper(helpers.NewUserMustAuth()).
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeNode)).
Helper(clusterutils.NewClustersHelper()).
Data("teaModule", "node").
Prefix("/clusters").
Get("", new(IndexAction)).
GetPost("/create", new(CreateAction)).