1、action中各动作添加数据权限
2、修改jwt中key为常量
This commit is contained in:
1 parent
d3622c93fc
commit
4b8c372038
8 files changed
+54
-16
No files matched your search
@@ -14,7 +14,7 @@ import (
|
||||
//权限检查中间件
|
||||
func AuthCheckRole() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
data, _ := c.Get("JWT_PAYLOAD")
|
||||
data, _ := c.Get(jwtauth.JwtPayloadKey)
|
||||
v := data.(jwtauth.MapClaims)
|
||||
e, err := mycasbin.Casbin()
|
||||
tools.HasError(err, "", 500)
|
||||
|
||||
Reference in new issue
Block a user