mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-06 01:50:25 +08:00
允许管理员调用UserService.LoginUser()借口
This commit is contained in:
@@ -292,9 +292,13 @@ func (this *UserService) CheckUserUsername(ctx context.Context, req *pb.CheckUse
|
|||||||
// LoginUser 登录
|
// LoginUser 登录
|
||||||
func (this *UserService) LoginUser(ctx context.Context, req *pb.LoginUserRequest) (*pb.LoginUserResponse, error) {
|
func (this *UserService) LoginUser(ctx context.Context, req *pb.LoginUserRequest) (*pb.LoginUserResponse, error) {
|
||||||
_, err := this.ValidateUserNode(ctx, false)
|
_, err := this.ValidateUserNode(ctx, false)
|
||||||
|
if err != nil {
|
||||||
|
// 允许管理员调用此接口
|
||||||
|
_, err = this.ValidateAdmin(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if !teaconst.IsPlus {
|
if !teaconst.IsPlus {
|
||||||
return &pb.LoginUserResponse{
|
return &pb.LoginUserResponse{
|
||||||
|
|||||||
Reference in New Issue
Block a user