This repository has been archived by the owner on Sep 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Adds support for multiple different helper roles #88
Open
jathak
wants to merge
9
commits into
master
Choose a base branch
from
multiple-roles
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Testing in staging. Will deploy to prod later when there's no OH |
We should try to get this merged as soon as we can, since there are various other feature requests that we'd want course staff to have, but not lab assistants. |
epai
reviewed
Sep 5, 2017
class User(db.Model, UserMixin): | ||
__tablename__ = 'user' | ||
id = db.Column(db.Integer, primary_key=True) | ||
created = db.Column(db.DateTime, default=db.func.now()) | ||
email = db.Column(db.String(255), nullable=False, index=True) | ||
name = db.Column(db.String(255), nullable=False) | ||
is_staff = db.Column(db.Boolean, default=False) | ||
role = db.Column(EnumType(Role), default=Role.student, nullable=False, index=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be misunderstanding this, but setting the default role to student
may be problematic when we migrate everyone from the old database
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are three main categories of role: staff (includes instructor, staff, and grader roles from Ok), helper (staff roles plus lab assistant role from Ok), and student (student or not enrolled on Ok).