add user.isGithubCool check

if user signs up with github, they become GithubCool.
This commit is contained in:
Berkeley Martinez
2015-08-04 13:39:59 -07:00
parent ce0b3b35c0
commit 2dc9934da2
2 changed files with 7 additions and 39 deletions

View File

@ -19,28 +19,14 @@
"password": { "password": {
"type": "string" "type": "string"
}, },
"facebook": {
"type": "string"
},
"twitter": {
"type": "string"
},
"google": {
"type": "string"
},
"github": {
"type": "string"
},
"linkedin": {
"type": "string"
},
"tokens": {
"type": "array"
},
"progressTimestamps": { "progressTimestamps": {
"type": "array", "type": "array",
"default": [] "default": []
}, },
"isGithubCool": {
"type": "boolean",
"default": false
},
"username": { "username": {
"type": "string", "type": "string",
"lowercase": true, "lowercase": true,
@ -123,12 +109,6 @@
"type": "string", "type": "string",
"default": "" "default": ""
}, },
"resetPasswordToken": {
"type": "string"
},
"resetPasswordExpires": {
"type": "string"
},
"completedBonfires": { "completedBonfires": {
"type": [ "type": [
{ {
@ -170,21 +150,10 @@
"type": "number", "type": "number",
"default": 0 "default": 0
}, },
"needsSomeDataModeled": {
"type": "boolean",
"default": false
},
"needsMigration": {
"type": "boolean",
"default": true
},
"sendMonthlyEmail": { "sendMonthlyEmail": {
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },
"challengesHash": {
"type": {}
},
"currentChallenge": { "currentChallenge": {
"type": {} "type": {}
}, },
@ -205,10 +174,6 @@
} }
], ],
"default": [] "default": []
},
"uncompletedChallenges": {
"type": "array",
"default": []
} }
}, },
"validations": [], "validations": [],

View File

@ -65,6 +65,9 @@ var passportOptions = {
if (email) { if (email) {
userObj.email = email; userObj.email = email;
} }
if (provider === 'github-login') {
userObj.isGithubCool = true;
}
return userObj; return userObj;
} }
}; };