修复账单与交易接口问题 & 管理员权限的身份限制
This commit is contained in:
@@ -356,6 +356,11 @@ func authPassword(c *fiber.Ctx, auth *AuthCtx, req *TokenReq, now time.Time) (*m
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// 非锁定管理员,不允许为空权限
|
||||
if !admin.Lock && (len(scopes) == 0) {
|
||||
return nil, ErrAuthorizeInvalidScope // 没有配置权限
|
||||
}
|
||||
|
||||
// 更新管理员登录时间
|
||||
admin.LastLogin = u.P(time.Now())
|
||||
admin.LastLoginIP = ip
|
||||
|
||||
Reference in New Issue
Block a user