-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert member role to learner role. Add default phase to new users who are learners. #1083
Convert member role to learner role. Add default phase to new users who are learners. #1083
Conversation
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.
Please see comments; minor changes requested.
|
||
expect(member).to.exist | ||
expect(member.chapterId).to.eq(this.chapter.id, 'member should have chapter ID for invite code') | ||
// TODO: fix - should assert github service function called w/ correct args |
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.
Please do add at least one assertion about a github service function being called.
src/server/workers/userCreated.js
Outdated
if (idmUser.roles.includes(LEARNER)) { | ||
const defaultPhase = (await Phase.getAll(DEFAULT_PHASE_NUMBER, {index: 'number'}))[0] | ||
if (!defaultPhase) { | ||
throw new Error('Phase not found for default numberL', DEFAULT_PHASE_NUMBER) |
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.
Typo: defaut numberL
235bf6a
to
cf7f541
Compare
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.
LGTM 👍
Fixes #1079.
Fixes #1080.
Overview
Converted roles where 'member' existed and replaced it with 'learner'. Added default phase when creating a new user who has the learner role in userCreated worker.
Data Model / DB Schema Changes
User model roles changed from 'member' to 'learner'.
Environment / Configuration Changes
None.
Notes