MCPcopy Create free account
hub / github.com/codecombat/codecombat / isTeacher

Function isTeacher

app/models/User.js:58–61  ·  view source on GitHub ↗
(user, includePossibleTeachers = false)

Source from the content-addressed store, hash-verified

56 },
57 isSmokeTestUser (user) { return utils.isSmokeTestEmail(user.email) },
58 isTeacher (user, includePossibleTeachers = false) {
59 if (includePossibleTeachers && (user.role === 'possible teacher')) { return true } // They maybe haven't created an account but we think they might be a teacher based on behavior
60 return ['teacher', 'technology coordinator', 'advisor', 'principal', 'superintendent', 'parent'].includes(user.role)
61 },
62}
63
64module.exports = (User = (function () {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected