Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Adds support for multiple different helper roles #88

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jathak
Copy link
Member

@jathak jathak commented Oct 12, 2016

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).

@knrafto
Copy link
Member

knrafto commented Oct 26, 2016

Testing in staging. Will deploy to prod later when there's no OH

@jathak
Copy link
Member Author

jathak commented Sep 5, 2017

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.

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)
Copy link
Contributor

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants