feat: 系统用户免登录认证,默认为admin操作所有接口
This commit is contained in:
@@ -3,7 +3,7 @@ package controller
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"be.ems/src/framework/config"
|
||||
libGlobal "be.ems/lib/global"
|
||||
"be.ems/src/framework/vo/result"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -21,8 +21,8 @@ type IndexController struct{}
|
||||
//
|
||||
// GET /
|
||||
func (s *IndexController) Handler(c *gin.Context) {
|
||||
name := config.Get("framework.name").(string)
|
||||
version := config.Get("framework.version").(string)
|
||||
name := "OMC"
|
||||
version := libGlobal.Version
|
||||
// str := "欢迎使用%s核心网管理平台,当前版本:%s,请通过前台地址访问。"
|
||||
str := "Welcome to the %s Core Network Management Platform, current version: %s, please access via the frontend address."
|
||||
c.JSON(200, result.OkMsg(fmt.Sprintf(str, name, version)))
|
||||
|
||||
@@ -30,7 +30,6 @@ func (s *CommontImpl) SystemConfigInfo() map[string]string {
|
||||
// 获取打包注入的全局变量信息
|
||||
infoMap["version"] = global.Version
|
||||
infoMap["buildTime"] = global.BuildTime
|
||||
infoMap["goVer"] = global.GoVer
|
||||
// 系统首次使用标记
|
||||
launchInfo := machine.LaunchInfo
|
||||
if launchInfo != nil {
|
||||
@@ -42,6 +41,8 @@ func (s *CommontImpl) SystemConfigInfo() map[string]string {
|
||||
} else {
|
||||
infoMap[common.LAUNCH_BOOTLOADER] = "true"
|
||||
}
|
||||
// 用户登录认证
|
||||
infoMap["loginAuth"] = fmt.Sprint(config.Get("user.loginAuth"))
|
||||
// 序列号
|
||||
infoMap["serialNum"] = fmt.Sprint(config.Get("omc.sn"))
|
||||
// 获取LOGO类型
|
||||
|
||||
Reference in New Issue
Block a user