zwxi 1 year ago
parent
commit
0e375c33f2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      controllers/base_auth.go

+ 2 - 1
controllers/base_auth.go

@@ -199,7 +199,8 @@ func (c *BaseAuthController) Prepare() {
 				api += v.Api + ","
 			}
 			api = strings.TrimRight(api,",")
-			if strings.Contains(api,uri) {
+			uri = strings.Replace(uri,"/adminapi","",1)
+			if !strings.Contains(api,uri) {
 				c.JSON(models.BaseResponse{Ret: 403, Msg: "无权访问!", ErrMsg: "无权访问!"}, false, false)
 				c.StopRun()
 				return