message: bug: Check student_id for whitelist
diff: @@ -498,12 +498,10 @@ export class CourseController {
  if (!course) {
  throw new NotFoundError();
  }
  +
  if (course.enrollType === 'whitelist') {
  const wUsers: IWhitelistUser[] = await WhitelistUser.find().where({courseId: course._id});
  - if (wUsers.filter(e =>
  - e.firstName === currentUser.profile.firstName.toLowerCase()
  - && e.lastName === currentUser.profile.lastName.toLowerCase()
  - && e.uid === currentUser.uid).length <= 0) {
  + if (wUsers.filter(e => e.uid === currentUser.uid).length < 1) {
  throw new ForbiddenError(errorCodes.course.notOnWhitelist.code);
  }
  } else if (course.accessKey && course.accessKey !== data.accessKey) {
  @@ -520,6 +518,7 @@ export class CourseController {
  }).save();
  await course.save();
  }
  +
  return {};
  }
  