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