freeCodeCamp/api-server/common/models/user.json

378 lines
8.4 KiB
JSON
Raw Normal View History

{
2015-06-03 23:48:17 +00:00
"name": "user",
"base": "User",
"strict": "filter",
2015-06-11 06:59:42 +00:00
"idInjection": true,
"emailVerificationRequired": false,
2015-06-11 06:59:42 +00:00
"trackChanges": false,
"properties": {
"email": {
"type": "string",
"index": {
"mongodb": {
"unique": true,
"background": true,
"sparse": true
}
}
2015-06-11 06:59:42 +00:00
},
"newEmail": {
"type": "string"
},
"emailVerifyTTL": {
"type": "date"
},
"emailVerified": {
2017-12-27 18:12:07 +00:00
"type": "boolean",
"default": false
},
"emailAuthLinkTTL": {
"type": "date"
},
"externalId": {
"type": "string",
"description": "A uuid/v4 used to identify user accounts"
},
"unsubscribeId": {
"type": "string",
"description": "An ObjectId used to unsubscribe users from the mailing list(s)"
},
2015-06-11 06:59:42 +00:00
"password": {
"type": "string",
"description": "No longer used for new accounts"
2015-06-11 06:59:42 +00:00
},
"progressTimestamps": {
"type": "array",
"default": []
},
2016-01-13 06:07:19 +00:00
"isBanned": {
"type": "boolean",
"description": "User is banned from posting to camper news",
"default": false
2016-01-13 06:07:19 +00:00
},
2016-01-24 23:28:15 +00:00
"isCheater": {
"type": "boolean",
"description": "Users who are confirmed to have broken academic honesty policy are marked as cheaters",
"default": false
2016-01-24 23:28:15 +00:00
},
"githubProfile": {
2015-08-06 00:49:19 +00:00
"type": "string"
},
"website": {
"type": "string"
},
"_csrf": {
"type": "string"
},
2015-06-04 19:47:31 +00:00
"username": {
"type": "string",
"index": {
"mongodb": {
"unique": true,
"background": true
}
},
"require": true
},
"about": {
"type": "string",
"default": ""
},
2015-06-04 19:47:31 +00:00
"name": {
"type": "string",
"default": ""
},
"location": {
"type": "string",
"default": ""
},
"picture": {
"type": "string",
"default": ""
},
2015-08-13 03:09:15 +00:00
"linkedin": {
"type": "string"
2015-06-04 19:47:31 +00:00
},
2015-08-13 03:09:15 +00:00
"codepen": {
"type": "string"
2015-06-04 19:47:31 +00:00
},
2015-08-13 03:09:15 +00:00
"twitter": {
"type": "string"
2015-06-04 19:47:31 +00:00
},
2018-05-27 11:59:04 +00:00
"acceptedPrivacyTerms": {
"type": "boolean",
"default": true
2018-05-27 11:59:04 +00:00
},
"sendQuincyEmail": {
"type": "boolean",
"default": true
},
"currentChallengeId": {
"type": "string",
2017-01-18 00:27:08 +00:00
"description": "The challenge last visited by the user",
"default": ""
},
2015-10-02 18:47:36 +00:00
"isHonest": {
"type": "boolean",
"description": "Camper has signed academic honesty policy",
"default": false
2015-10-02 18:47:36 +00:00
},
"isFrontEndCert": {
"type": "boolean",
"description": "Camper is front end certified",
2016-09-24 15:44:18 +00:00
"default": false
2015-10-02 18:47:36 +00:00
},
2016-01-11 23:58:37 +00:00
"isDataVisCert": {
"type": "boolean",
"description": "Camper is data visualization certified",
2016-09-24 15:44:18 +00:00
"default": false
2016-01-11 23:58:37 +00:00
},
2015-12-09 20:56:05 +00:00
"isBackEndCert": {
"type": "boolean",
"description": "Campers is back end certified",
"default": false
2015-12-09 20:56:05 +00:00
},
2015-10-02 18:47:36 +00:00
"isFullStackCert": {
"type": "boolean",
"description": "Campers is full stack certified",
"default": false
},
"isRespWebDesignCert": {
"type": "boolean",
"description": "Camper is responsive web design certified",
"default": false
},
"is2018DataVisCert": {
"type": "boolean",
"description": "Camper is data visualization certified (2018)",
"default": false
},
"isFrontEndLibsCert": {
"type": "boolean",
"description": "Camper is front end libraries certified",
"default": false
},
"isJsAlgoDataStructCert": {
"type": "boolean",
"description": "Camper is javascript algorithms and data structures certified",
"default": false
},
"isApisMicroservicesCert": {
"type": "boolean",
"description": "Camper is apis and microservices certified",
"default": false
},
"isInfosecQaCert": {
"type": "boolean",
"description": "Camper is information security and quality assurance certified",
"default": false
},
"is2018FullStackCert": {
"type": "boolean",
"description": "Camper is full stack certified (2018)",
"default": false
},
"completedChallenges": {
2015-06-11 06:59:42 +00:00
"type": [
{
"completedDate": "number",
"id": "string",
"solution": "string",
"githubLink": "string",
"challengeType": "number",
"files": {
"type": [
{
"contents": {
"type": "string",
"default": ""
},
"ext": {
"type": "string"
},
"path": {
"type": "string"
},
"name": {
"type": "string"
},
"key": {
"type": "string"
}
}
],
"default": []
}
}
2015-06-11 06:59:42 +00:00
],
"default": []
},
"portfolio": {
"type": "array",
"default": []
},
"yearsTopContributor": {
"type": "array",
"default": []
},
"rand": {
"type": "number",
"index": true
2015-09-27 17:49:44 +00:00
},
"timezone": {
"type": "string"
},
"theme": {
"type": "string",
"default": "default"
2016-06-17 19:35:10 +00:00
},
"profileUI": {
"type": "object",
"default": {
"isLocked": true,
"showAbout": false,
"showCerts": false,
2018-09-18 08:36:20 +00:00
"showDonation": false,
"showHeatMap": false,
"showLocation": false,
"showName": false,
"showPoints": false,
"showPortfolio": false,
"showTimeLine": false
}
},
2016-10-28 08:18:18 +00:00
"badges": {
"type": {
"coreTeam": {
"type": "array",
"default": []
}
},
"default": {}
},
2018-07-30 18:58:36 +00:00
"donationEmails": {
"type": [
"string"
]
},
"isDonating": {
"type": "boolean",
2018-07-30 18:58:36 +00:00
"description": "Does the camper have an active donation",
"default": false
2015-06-11 06:59:42 +00:00
}
},
"validations": [],
2015-06-12 20:14:07 +00:00
"relations": {
"donations": {
"type": "hasMany",
2018-07-30 18:58:36 +00:00
"foreignKey": "",
"modal": "donation"
},
2015-06-12 20:14:07 +00:00
"credentials": {
"type": "hasMany",
"model": "userCredential",
"foreignKey": ""
},
"identities": {
"type": "hasMany",
"model": "userIdentity",
"foreignKey": ""
},
"pledge": {
"type": "hasOne",
"model": "pledge",
"foreignKey": ""
},
"authTokens": {
"type": "hasMany",
"model": "AuthToken",
"foreignKey": "userId",
"options": {
"disableInclude": true
}
2018-07-30 20:06:56 +00:00
},
"articles": {
"type": "hasMany",
"model": "article",
"foreignKey": "externalId"
2015-06-12 20:14:07 +00:00
}
},
2015-06-11 06:59:42 +00:00
"acls": [
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY"
},
{
"principalType": "ROLE",
"principalId": "$everyone",
2017-12-29 04:39:08 +00:00
"permission": "DENY",
"property": "create"
},
{
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY",
"property": "login"
2015-07-29 18:32:16 +00:00
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY",
2017-12-29 04:39:08 +00:00
"property": "verify"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY",
2017-12-29 04:39:08 +00:00
"property": "resetPassword"
2015-07-29 22:00:24 +00:00
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
2017-12-29 04:39:08 +00:00
"property": "doesExist"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
2017-12-29 04:39:08 +00:00
"principalId": "$everyone",
"permission": "ALLOW",
2017-12-29 04:39:08 +00:00
"property": "about"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "getPublicProfile"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
2017-12-29 04:39:08 +00:00
"principalId": "$everyone",
"permission": "ALLOW",
2017-12-29 04:39:08 +00:00
"property": "giveBrowniePoints"
2016-06-17 19:35:10 +00:00
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$owner",
"permission": "ALLOW",
2017-12-29 04:39:08 +00:00
"property": "updateTheme"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "getMessages"
2015-06-11 06:59:42 +00:00
}
],
"methods": {}
}