feat: switch to global auth and tenant route prefix
This commit is contained in:
@@ -64,10 +64,7 @@ func (s *user) LoginWithOTP(ctx context.Context, tenantID int64, phone, otp stri
|
||||
if u.Status == consts.UserStatusBanned {
|
||||
return nil, errorx.ErrAccountDisabled
|
||||
}
|
||||
// 4. 校验租户成员关系(租户上下文下仅允许成员登录)。
|
||||
if err := s.ensureTenantMember(ctx, tenantID, u.ID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// 4. 登录不校验租户成员关系;租户资源访问时再校验权限。
|
||||
|
||||
// 5. 生成 Token
|
||||
token, err := s.jwt.CreateToken(s.jwt.CreateClaims(jwt.BaseClaims{
|
||||
|
||||
Reference in New Issue
Block a user