discourse/spec
Blake Erickson ed0e4582a1
DEV: If disabled do not change setting after import (#12142)
When running an import script there are many site settings that are
changed but we reset them back to where they were originally before the
import. However, there are two settings that we don't roll back:

```
purge_unactivated_users_grace_period_days
purge_deleted_uploads_grace_period_days
```

which could have some unintended consequences.

My first question is do we *really* have to change these settings? I'm
not a huge fan of changing someones settings without them really knowing
they were changed.

If we really do have to change these settings here is my proposed PR
where we don't alter the `purge_unactivated_users_grace_period_days` if
it has been disabled.

As I'm writing this another change we could make is that we don't change
either of these site settings if we detect that they aren't set to the
default values.

The drive behind this PR is that there is a discourse instance which
relies on staged users as part of their workflow and this setting was
changed by accident via the import script causing users to be deleted
that shouldn't have been.
2021-02-19 09:33:35 -07:00
..
components DEV: More refactoring of SCSS importers (#12143) 2021-02-19 11:22:24 -05:00
fabricators FEATURE: New way to dismiss new topics (#11927) 2021-02-04 11:27:34 +11:00
fixtures DEV: Update mail and use fork (#10639) 2021-02-18 20:15:02 +02:00
helpers A11Y: sets the html lang to user's locale when possible (#12007) 2021-02-10 16:12:09 +01:00
import_export FEATURE: Rake task to export groups (#9450) 2020-04-17 14:59:54 -07:00
initializers FIX: We need to skip users with associated reviewables when auto-approving (#9080) 2020-03-02 14:33:52 -05:00
integration FIX: Auto close topic from category settings based on topic created_at (#12082) 2021-02-17 07:51:39 +10:00
integrity DEV: Add i18n fallback specs (#11669) 2021-01-08 17:47:28 +01:00
jobs FEATURE: Use the "time_read" stat to flag users as suspicious. (#12145) 2021-02-19 13:10:19 -03:00
lib FIX: Do not mark group_flair images as secure on upload (#12081) 2021-02-16 12:34:03 +10:00
mailers FEATURE: Add English (UK) as locale (#11768) 2021-01-20 21:32:22 +01:00
models FIX: Don't require a rejection reason if the user is a spammer. (#12141) 2021-02-19 12:57:01 -03:00
multisite DEV: Prevents rate limits for new feature checks on multisite (#12053) 2021-02-12 08:52:59 -05:00
requests FIX: Limit post read time to the max integer value (#12126) 2021-02-18 17:48:15 +03:00
script/import_scripts DEV: If disabled do not change setting after import (#12142) 2021-02-19 09:33:35 -07:00
serializers FIX: do not show SSO last payload to moderators (#12084) 2021-02-15 16:12:06 +05:30
services FIX: dismiss new when topic_user exists without last read (#12103) 2021-02-18 10:39:05 +11:00
support SECURITY: Attach DiscourseConnect (SSO) nonce to current session (#12124) 2021-02-18 10:35:10 +00:00
tasks FIX: remove migrate_from_s3 task that silently corrupts data (#11703) 2021-01-17 22:33:29 +01:00
views/omniauth_callbacks FEATURE: Use full page redirection for all external auth methods (#8092) 2019-10-08 12:10:43 +01:00
rails_helper.rb DEV: Update DB.after_commit to be compatible with 'real' transactions (#11294) 2020-12-08 11:03:31 +11:00
swagger_helper.rb api docs example (#11997) 2021-02-08 10:09:44 -07:00