LyricTian / gin-admin

A lightweight, flexible, elegant and full-featured RBAC scaffolding based on GIN + GORM 2.0 + Casbin 2.0 + Wire DI.
http://101.42.232.163:8040
Apache License 2.0
2.57k stars 518 forks source link

构建(http.go, auth.go):添加RootID字段到AuthConfig结构体 #156

Closed gopkg-dev closed 4 months ago

gopkg-dev commented 4 months ago

修复在 config.C.Middleware.Auth.Disable 为 true 时只设置了用户 ID 没有设置上下文导致接口提示用户不存在的 bug。

复现流程设置 config.C.Middleware.Auth.Disable = true 重新登陆 root 账号 访问 /api/v1/current/user