(campaignData)
| 1498 | // - Teacher |
| 1499 | // Update in server/models/User also, if updated here. |
| 1500 | hasCampaignAccess (campaignData) { |
| 1501 | if (utils.freeCampaignIds.includes(campaignData._id)) { return true } |
| 1502 | if (this.isAdmin() || this.isInternal()) { return true } |
| 1503 | |
| 1504 | if (User.isTeacher(this.attributes)) { return true } // TODO revisit this - we may want to restrict unpaid teachers |
| 1505 | if (this.isStudent()) { return true } // TODO this should validate the student license, but we currently check this else where |
| 1506 | |
| 1507 | return false |
| 1508 | } |
| 1509 | |
| 1510 | // Template for a new experiment. |
| 1511 | // getOrStartTemplateExperimentValue () { |
nothing calls this directly
no test coverage detected