Merge remote-tracking branch 'origin/mark' into yonghui
This commit is contained in:
@@ -285,7 +285,7 @@ func Login(ctx *Context, authType, authID, authIDType, authSecret string) (authI
|
||||
if authSecret == InternalAuthSecret {
|
||||
authSecret = ""
|
||||
}
|
||||
return LoginInternal(ctx, authIDType, authID, authIDType, authSecret)
|
||||
return LoginInternal(ctx, authType, authID, authIDType, authSecret)
|
||||
}
|
||||
|
||||
// 通过临时TOKEN绑定新创建的用户
|
||||
|
||||
@@ -153,11 +153,11 @@ func RegisterUserWithMobile(ctx *jxcontext.Context, user *model.User, mobileVeri
|
||||
createName := ctx.GetRealRemoteIP()
|
||||
authType := auth2.AuthTypeMobile
|
||||
if manTokenInfo != nil && mobileVerifyCode == "" {
|
||||
user, err2 := dao.GetUserByID(dao.GetDB(), "user_id", manTokenInfo.GetID())
|
||||
manUser, err2 := dao.GetUserByID(dao.GetDB(), "user_id", manTokenInfo.GetID())
|
||||
if err = err2; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if user.Type&(model.UserTypeOperator|model.UserTypeBoss) == 0 {
|
||||
if manUser.Type&(model.UserTypeOperator|model.UserTypeBoss) == 0 {
|
||||
return nil, fmt.Errorf("管理员才能添加商户")
|
||||
}
|
||||
if utils.Pointer2String(user.Mobile) == "" {
|
||||
|
||||
Reference in New Issue
Block a user