|
|
@@ -27,10 +27,10 @@ func AuthCheckRole() gin.HandlerFunc {
|
|
|
e := sdk.Runtime.GetCasbinKey(c.Request.Host)
|
|
|
res := permission.CheckRoleApi(c, v, e)
|
|
|
if res {
|
|
|
- log.Infof("isTrue: %v role: %s method: %s path: %s", res, v["rolekey"], c.Request.Method, c.Request.URL.Path)
|
|
|
+ log.Debugf("isTrue: %v role: %s method: %s path: %s", res, v["rolekey"], c.Request.Method, c.Request.URL.Path)
|
|
|
c.Next()
|
|
|
} else {
|
|
|
- log.Warnf("isTrue: %v role: %s method: %s path: %s message: %s", res, v["rolekey"], c.Request.Method, c.Request.URL.Path, "当前request无权限,请管理员确认!")
|
|
|
+ log.Warnf("isTrue: %v role: %s method: %s path: %s message: %s", res, v["rolekey"], c.Request.Method, c.Request.URL.Path, "当前接口无权限,请管理员确认!")
|
|
|
c.JSON(http.StatusOK, gin.H{
|
|
|
"code": 403,
|
|
|
"msg": "对不起,您没有该接口访问权限,请联系管理员",
|