查询当前登录用户排名,
This commit is contained in:
@ -31,7 +31,7 @@ func Auth(r *ghttp.Request) {
|
||||
ctx := r.GetCtx()
|
||||
if token == "" {
|
||||
glog.Infof(ctx, "未登录用户访问: %s %s", r.URL.Path, r.Method)
|
||||
r.SetCtxVar("permission", "guest")
|
||||
r.SetCtxVar("role", "guest")
|
||||
} else {
|
||||
if !strings.HasPrefix(token, "Bearer ") {
|
||||
Exit(r, ecode.InvalidOperation.Sub("无效的token格式"))
|
||||
|
||||
Reference in New Issue
Block a user