Fix #3534: Remove Janitor Trials.

This commit is contained in:
evazion
2019-11-17 02:05:01 -06:00
parent 1ae971269c
commit 72f17fd1de
19 changed files with 11 additions and 436 deletions

View File

@@ -13,15 +13,9 @@ module ApproverPruner
CurrentUser.scoped(User.system, "127.0.0.1") do
next if user.is_admin?
janitor_trial = JanitorTrial.where(user_id: user.id).first
user.update!(can_approve_posts: false)
user.feedback.create(category: "neutral", body: "Lost approval privileges")
if janitor_trial && user.can_approve_posts?
janitor_trial.demote!
else
user.can_approve_posts = false
user.save
end
Dmail.create_automated(
:to_id => user.id,
:title => "Approver inactivity",