Merge pull request #6425 from FreeCodeCamp/feature/cheaters
Block certs from cheaters
This commit is contained in:
@ -28,6 +28,11 @@
|
|||||||
"default": false,
|
"default": false,
|
||||||
"description": "User is banned from posting to camper news"
|
"description": "User is banned from posting to camper news"
|
||||||
},
|
},
|
||||||
|
"isCheater": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Users who are confirmed to break academic honesty policy are marked as cheaters"
|
||||||
|
},
|
||||||
"isGithubCool": {
|
"isGithubCool": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false
|
"default": false
|
||||||
|
@ -315,6 +315,18 @@ module.exports = function(app) {
|
|||||||
});
|
});
|
||||||
return res.redirect('back');
|
return res.redirect('back');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user.isCheater) {
|
||||||
|
req.flash('errors', {
|
||||||
|
msg: dedent`
|
||||||
|
Upon review, this account has been flagged for academic
|
||||||
|
dishonesty. If you’re the owner of this account contact
|
||||||
|
team@freecodecamp.com for details.
|
||||||
|
`
|
||||||
|
});
|
||||||
|
return res.redirect(`/${user.username}`);
|
||||||
|
}
|
||||||
|
|
||||||
if (user.isLocked) {
|
if (user.isLocked) {
|
||||||
req.flash('errors', {
|
req.flash('errors', {
|
||||||
msg: dedent`
|
msg: dedent`
|
||||||
|
Reference in New Issue
Block a user