1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-25 09:08:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-03-08 08:38:13 +08:00
parent 26e62a1b22
commit 5260027c9f
3 changed files with 7 additions and 4 deletions

View File

@ -376,7 +376,7 @@ func init() {
GETTOKEN: {Help: "令牌", Style: html.DANGER, Hand: func(m *ice.Message, arg ...string) {
m.Options(m.Cmd(SPIDE, m.Option(mdb.NAME)).AppendSimple()).Cmdy(SPIDE, mdb.DEV_REQUEST)
}},
GRANT: {Name: "grant username", Hand: func(m *ice.Message, arg ...string) {
GRANT: {Name: "grant username", Role: aaa.VOID, Hand: func(m *ice.Message, arg ...string) {
if aaa.IsTechOrRoot(m) && m.Option(aaa.USERNAME) != "" {
m.Option(ice.MSG_USERNAME, m.Option(aaa.USERNAME))
}

View File

@ -74,7 +74,7 @@ func _go_show(m *ice.Message, arg ...string) {
// ctx.ProcessField(m, "web.code.xterm", kit.Simple())
ctx.ProcessField(m, "log.debug", kit.Simple("bench"))
} else if cmd := ctx.GetFileCmd(path.Join(arg[2], arg[1])); cmd != "" {
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); path.Base(arg[1]) != "portal.go" && nfs.Exists(m, p) &&
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); path.Base(arg[1]) != "portal.go" &&
!kit.IsIn(arg[1],
"gonganxitong/user.go",
"gonganxitong/sess.go",
@ -82,7 +82,8 @@ func _go_show(m *ice.Message, arg ...string) {
"gonganxitong/domain.go",
"gonganxitong/command.go",
"gonganxitong/quotalist.go",
) {
"operation/studio.go",
) && nfs.Exists(m, p) {
if cmd := ctx.GetFileCmd(p); cmd != "" {
if m.ActionKey() == mdb.RENDER {
ctx.ProcessField(m, cmd, kit.Simple())

View File

@ -22,7 +22,9 @@ func _js_show(m *ice.Message, arg ...string) {
ctx.ProcessField(m, kit.Select(ice.CAN_PLUGIN, "web."+strings.Replace(strings.TrimSuffix(strings.TrimPrefix(arg[1], "plugin/local/"), nfs.PT+JS), nfs.PS, nfs.PT, -1)), nil)
}
} else {
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); nfs.Exists(m, p) {
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); !kit.IsIn(arg[1],
"operation/studio.js",
) && nfs.Exists(m, p) {
if cmd := ctx.GetFileCmd(p); cmd != "" {
ctx.ProcessField(m, cmd, kit.Simple())
return