switch approver and post pruners to use system user

This commit is contained in:
r888888888
2017-02-28 17:10:36 -08:00
parent 27f7f4f12e
commit e94edc9a75
3 changed files with 8 additions and 12 deletions

View File

@@ -7,10 +7,8 @@ class ApproverPruner
end
def prune!
admin = User.admins.first
inactive_approvers.each do |user|
CurrentUser.scoped(admin, "127.0.0.1") do
CurrentUser.scoped(User.system, "127.0.0.1") do
next if user.is_admin?
janitor_trial = JanitorTrial.where(user_id: user.id).first