From 1f309a474bae3e1d67a86a45ff4d0f7d54045c12 Mon Sep 17 00:00:00 2001 From: 17shou_VIP <46047898+WhiteSnowPinkPinkWhatItLike@users.noreply.github.com> Date: Mon, 5 Aug 2019 14:52:05 +0800 Subject: [PATCH] Fixed Bugs ACL --- utilities/check-spam.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utilities/check-spam.js b/utilities/check-spam.js index b078f89..2e6b1cf 100644 --- a/utilities/check-spam.js +++ b/utilities/check-spam.js @@ -9,6 +9,7 @@ const akismetClient = akismet.client({ exports.checkSpam = (comment, ip)=> { if (process.env.AKISMET_KEY === 'MANUAL_REVIEW') { console.log('已使用人工审核模式,评论审核后才会发表~'); + comment.setACL(new AV.ACL({"*":{"read":false}})); comment.set('isSpam', true); comment.save(); return; @@ -39,6 +40,7 @@ exports.checkSpam = (comment, ip)=> { // comment.destroy(); } else { comment.set('isSpam', false); + comment.setACL(new AV.ACL({"*":{"read":true}})); comment.save(); console.log('垃圾评论检测完成,放行~'); }