Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1205 from geli-lms/develop
Browse files Browse the repository at this point in the history
Release 0.8.5
  • Loading branch information
kesselb committed Mar 26, 2019
2 parents dfac6cc + 476e781 commit 9da18cf
Show file tree
Hide file tree
Showing 62 changed files with 2,207 additions and 3,534 deletions.
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,42 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [[0.8.5](https://github.com/geli-lms/geli/releases/tag/v0.8.5)] - 2019-03-26 - WS 18/19 🎉-Release
### Added
- Translatable SnackBarService. [#922](https://github.com/geli-lms/geli/issues/922)
- `ProgressController` `GET` unit tests & access denial tests in general. [#1116](https://github.com/geli-lms/geli/issues/1116)
- `UnitController` `GET` & `DELETE` route unit tests for status code `200`. [#1190](https://github.com/geli-lms/geli/issues/1190)
- `UnitController` status code `403` (not authorized to view / edit course) unit tests for all routes. [#1190](https://github.com/geli-lms/geli/issues/1190)
- `WhitelistController` status code `403` unit tests for all routes. [#1192](https://github.com/geli-lms/geli/issues/1192)
- Sticky header for course view. [#1115](https://github.com/geli-lms/geli/issues/1115)
- `MediaController` status code `403` unit tests for all routes. [#1196](https://github.com/geli-lms/geli/issues/1196)
- `CourseMediaMigration` to patch the `_course` properties of a `Course`'s `Directory` / `File` tree. [#1196](https://github.com/geli-lms/geli/issues/1196)

### Changed
- Extend `ProgressController` `PUT` route to handle both creation and updates. [#1116](https://github.com/geli-lms/geli/issues/1116)
- Refactor `ProgressController` unit tests in general. [#1116](https://github.com/geli-lms/geli/issues/1116)
- Refactor `MediaController` unit tests in general using the `TestHelper`. [#1196](https://github.com/geli-lms/geli/issues/1196)
- Instead of a list of progress data, the `ProgressController` `GET` route now responds with a single progress object or an empty object if no data can be found. [#1116](https://github.com/geli-lms/geli/issues/1116)
- `Directory` / `File` schemata and the corresponding interfaces now reference their `Course` as `_course` (analogous to the `Unit` schema). [#1196](https://github.com/geli-lms/geli/issues/1196)

### Removed
- Unused `ProgressController` `GET` routes for `/courses/` & `/users/`. [#1116](https://github.com/geli-lms/geli/issues/1116)
- `ProgressController` `POST` route _(obviated by extended `PUT` route)_. [#1116](https://github.com/geli-lms/geli/issues/1116)
- Unused `WhitelistController` `PUT` route. [#1192](https://github.com/geli-lms/geli/issues/1192)
- Dependency `migrate-mongoose`. [#1189](https://github.com/geli-lms/geli/pull/1189)

### Fixed
- `TaskUnitComponent.validate` `validationMode` reset. [#1116](https://github.com/geli-lms/geli/issues/1116)
- `CodeKataComponent` `progress.code` loading. [#1116](https://github.com/geli-lms/geli/issues/1116)
- Code order in the `MediaController`'s `createDirectory` & `createFile`. [#1196](https://github.com/geli-lms/geli/issues/1196)
- Notification scroll bug. [#1082](https://github.com/geli-lms/geli/issues/1082)

### Security
- Close `ProgressController` vulnerabilities. [#1116](https://github.com/geli-lms/geli/issues/1116)
- Close `UnitController` vulnerabilities. [#1190](https://github.com/geli-lms/geli/issues/1190)
- Close `WhitelistController` vulnerabilities. [#1192](https://github.com/geli-lms/geli/issues/1192)
- Close `MediaController` vulnerabilities. [#1196](https://github.com/geli-lms/geli/issues/1196)

## [[0.8.4](https://github.com/geli-lms/geli/releases/tag/v0.8.4)] - 2018-12-20 - WS 18/19 ❄️-Release
### Added
- Export PDF with styled free text units. [#997](https://github.com/geli-lms/geli/issues/997) [#1047](https://github.com/geli-lms/geli/pull/1047)
Expand Down
14 changes: 14 additions & 0 deletions api/fixtures/FixtureUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,20 @@ export class FixtureUtils {
});
}

/**
* Obtain an unauthorized student for a course.
* This student can be used for access denial unit tests.
*
* @param course The student can't belong to this given course; i.e. the student won't be part of the 'students'.
* @returns A user with 'student' role that is not authorized to access the given course.
*/
public static async getUnauthorizedStudentForCourse(course: ICourse): Promise<IUserModel> {
return await User.findOne({
_id: {$nin: course.students},
role: 'student'
});
}

private static async getAdmins(): Promise<IUser[]> {
return this.getUser('admin');
}
Expand Down
Loading

0 comments on commit 9da18cf

Please sign in to comment.