public async Task <LabelManageModel> GetByIdAsync(string user, long id) { var model = await _repository.GetByIdAsync(id, true); if (model != null && !model.Group.GroupUser.Any(gu => gu.UserId.Equals(user))) { throw new ForbidException(); } return(_mapper.Map <LabelManageModel>(model)); }