freeCodeCamp / freeCodeCamp/classroom

Adding support for multiple teachers in a classroom & setting up RBAC for individual classrooms

Open
#310 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
155
Forks
138
PR merge metrics
No merged PRs in 30d

Description

While reviewing this PR (https://github.com/freeCodeCamp/classroom/pull/252), we noticed some significant areas for improvement. However, the PR is so old, that we figured it makes more sense to log the changes as a new issue.

Work on this was started here: https://github.com/freeCodeCamp/classroom/pull/252

The contributors ended up doing some migrations that looked awkward/hacky. After changing the teacherId to an array, the UserID foreign key constraint broke. They tried to fix the issue by making the foreign key constraint optional. A better solution is to create a new role (classroomOwner). The previous UserID foreign key should refer to the classroomOwner's Id.

Eventually, we also want to be able to use this foundation to set up RBAC inside a classroom. (Hence the need for a classroomOwner role)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.