Commit Graph

14 Commits

Author SHA1 Message Date
evazion
a7dc05ce63 Enable frozen string literals.
Make all string literals immutable by default.
2021-12-14 21:33:27 -06:00
evazion
ed302fdf4d docs: add documentation for various classes in app/logical. 2021-06-23 06:23:29 -05:00
evazion
3d410398a3 approver pruner: send weekly warning dmails to inactive approvers.
Send weekly warning dmails to approvers in danger of losing their
approver permissions. Don't send warnings if we're more than three weeks
away from demotion so that approvers aren't warned prematurely.
2020-02-27 00:19:16 -06:00
evazion
b4ce2d83a6 models: remove belongs_to_creator macro.
The belongs_to_creator macro was used to initialize the creator_id field
to the CurrentUser. This made tests complicated because it meant you had
to create and set the current user every time you wanted to create an
object, when lead to the current user being set over and over again. It
also meant you had to constantly be aware of what the CurrentUser was in
many different contexts, which was often confusing. Setting creators
explicitly simplifies everything greatly.
2020-01-21 00:09:38 -06:00
evazion
2095dd3084 users: refactor bit_prefs search. 2020-01-17 22:13:12 -06:00
evazion
c32f9fbdb8 approver prune: don't prune recently promoted approvers.
Don't prune people who were just promoted in the last 45 days. Also fix
bug where approvers with zero approvals weren't pruned.
2020-01-07 20:24:17 -06:00
evazion
bdebd1a594 approver pruner: change inactivity threshold to 30 approvals in 45 days.
* Change minimum activity threshold to 30 approvals in 45 days.
* Exclude mods from losing privileges, not just admins.
* Fix undeletions of old posts not counting towards the activity threshold.
2019-12-23 00:44:22 -06:00
evazion
309821bf73 rubocop: fix various style issues. 2019-12-22 21:23:37 -06:00
evazion
72f17fd1de Fix #3534: Remove Janitor Trials. 2019-11-17 02:10:24 -06:00
Albert Yi
31df8d9f87 add inactive approver pruner 2018-08-28 15:02:03 -07:00
r888888888
e94edc9a75 switch approver and post pruners to use system user 2017-02-28 17:10:36 -08:00
r888888888
8a57d38f38 remove statement about responding in automated messages 2017-02-24 10:36:45 -08:00
evazion
b1af644f67 dmails: send automated dmails from Danbooru.config.system_user.
Sends automated dmails from `Danbooru.config.system_user`, rather than
whichever user is performing the action happens to be (usually User.admins.first).

Also adds a notice in the view that the dmail was automated.
2017-02-23 22:51:17 -06:00
Toks
6f17e1bac8 Rename janitor pruner to approver pruner 2015-11-28 10:58:39 -05:00