message: API: Fix/Improve Course checkPrivileges
diff: @@ -272,12 +272,13 @@ courseSchema.statics.changeCourseAdminFromUser = async function (userFrom: IUser
  courseSchema.methods.checkPrivileges = function (user: IUser) {
  const {userIsAdmin, ...userIs} = User.checkPrivileges(user);
  + const userId = extractMongoId(user._id);
  const courseAdminId = extractMongoId(this.courseAdmin);
  - const userIsCourseAdmin: boolean = user._id === courseAdminId;
  - const userIsCourseTeacher: boolean = this.teachers.some((teacher: IUserModel) => user._id === extractMongoId(teacher));
  - const userIsCourseStudent: boolean = this.students.some((student: IUserModel) => user._id === extractMongoId(student));
  + const userIsCourseAdmin: boolean = userId === courseAdminId;
  + const userIsCourseTeacher: boolean = this.teachers.some((teacher: IUserModel) => userId === extractMongoId(teacher));
  + const userIsCourseStudent: boolean = this.students.some((student: IUserModel) => userId === extractMongoId(student));
  const userIsCourseMember: boolean = userIsCourseAdmin || userIsCourseTeacher || userIsCourseStudent;
  const userCanEditCourse: boolean = userIsAdmin || userIsCourseAdmin || userIsCourseTeacher;
  