|
@@ -45,6 +45,7 @@ func Auth(settingObj cfacade.ProfileJSON) gin.HandlerFunc {
|
|
|
// common.PackUnauthorizedResult(c, code.InternalError, "")
|
|
|
// return
|
|
|
// }
|
|
|
+ // mhayaLogger.Warnf("Auth s: %s", s)
|
|
|
|
|
|
ss, err := mdb.RDB.HGet(context.Background(), "admin::token::"+tokenString, constant.AdminAccess).Result()
|
|
|
if err != nil {
|
|
@@ -52,6 +53,7 @@ func Auth(settingObj cfacade.ProfileJSON) gin.HandlerFunc {
|
|
|
common.PackUnauthorizedResult(c, code.InternalError, "")
|
|
|
return
|
|
|
}
|
|
|
+ mhayaLogger.Warnf("Auth ss: %s", ss)
|
|
|
|
|
|
// 检查是否有权限
|
|
|
if ss == "" && result == "" {
|
|
@@ -60,6 +62,7 @@ func Auth(settingObj cfacade.ProfileJSON) gin.HandlerFunc {
|
|
|
}
|
|
|
|
|
|
openIpWhitelist := settingObj.Get("open_ip_whitelist").ToBool()
|
|
|
+ mhayaLogger.Warnf("Auth open_ip_whitelist: %v", openIpWhitelist)
|
|
|
if openIpWhitelist {
|
|
|
err = checkIPWhitelist(c)
|
|
|
if err != nil {
|