mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 05:30:27 +08:00
28 lines
575 B
Go
28 lines
575 B
Go
package dashboard
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
)
|
|
|
|
type IndexAction struct {
|
|
actionutils.ParentAction
|
|
}
|
|
|
|
func (this *IndexAction) Init() {
|
|
this.Nav("", "", "")
|
|
}
|
|
|
|
func (this *IndexAction) RunGet(params struct{}) {
|
|
// 取得用户的权限
|
|
module, ok := configloaders.FindFirstAdminModule(this.AdminId())
|
|
if ok {
|
|
for _, m := range configloaders.AllModuleMaps() {
|
|
if m.GetString("code") == module {
|
|
this.RedirectURL(m.GetString("url"))
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|