Merge pull request #6425 from FreeCodeCamp/feature/cheaters
Block certs from cheaterspull/6433/head
commit
d3ed4f425c
|
@ -28,6 +28,11 @@
|
|||
"default": false,
|
||||
"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": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
|
|
|
@ -315,6 +315,18 @@ module.exports = function(app) {
|
|||
});
|
||||
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) {
|
||||
req.flash('errors', {
|
||||
msg: dedent`
|
||||
|
|
Loading…
Reference in New Issue