edulinq / autograder-server

A server to automatically grading coding assignments.
MIT License
4 stars 5 forks source link

New API: courses/users/list #88

Closed Lucas-Ellenberger closed 1 month ago

Lucas-Ellenberger commented 2 months ago

This PR must be reviewed with the corresponding autograder-py PR. This PR should be reviewed after the PR for users/list.

This PR adds a new role 'CourseRoleSuper' which cannot be held by a normal user within a course (it will be a validation error). The role is reserved for users with serverRoleAdmin or above that are using course specific APIs. These server admins are granted a higher role to have power over the courseRoleOwner role. This distinction is important for actions that cannot be performed against users with an equal role (like the future courses/users/drop). (Edit: Outdated)

The PR also adds a new API endpoint for listing course users: courses/users/list.

Note: There are change that overlap with the PR for users/list as they are essential for both PRs to function, hence why the users/list PR should be reviewed and merged first.

Also, the run_tests.sh script is flaky and randomly fails to create the container that is necessary for the 'TestDockerSubmissions' test. Specifically, it has a chance to fail on 'course-languages/bash/test-submissions/solution/test-solution/test-submission.json'.