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

Method isPaidTeacher

app/models/User.js:309–314  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

307 isTeacher (includePossibleTeachers = false) { return User.isTeacher(this.attributes, includePossibleTeachers) }
308
309 isPaidTeacher () {
310 // TODO: this doesn't actually check to see if they are paid (having prepaids), confusing
311 // use isPaidTeacher from me.js in vuex store for vue
312 if (!this.isTeacher()) { return false }
313 return this.isCreatedByClient() || (/@codeninjas.com$/i.test(this.get('email')))
314 }
315
316 hasAiJuniorAccess () {
317 return this.isAdmin() || this.isBetaTester() || this.isOnlineTeacher() || !this.isAnonymous()

Callers 4

isPaidTeacherFunction · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80

Calls 3

isTeacherMethod · 0.95
isCreatedByClientMethod · 0.95
getMethod · 0.95

Tested by

no test coverage detected