Refactor allow possible spam feature flag into an application setting
What does this MR do and why?
This MR refactors the allow_possible_spam
feature flag into an application setting. The current value of the feature flag is false
and the default value of this new column is false
too.
This setting allows to:
- have Akismet enabled for monitoring purposes
- have reCAPTCHA disabled and accept all changes
The logic is as follows when creating or updating an issue or a snippet:
- Akismet flags as spam?
- yes:
-
allow_possible_spam = true
: allow and log (OVERRIDE_VIA_ALLOW_POSSIBLE_SPAM
) -
allow_possible_spam = false
:-
captcha_enabled = true
: conditional allow with CAPTCHA and log (CONDITIONAL_ALLOW
) -
captcha_enabled = false
: do not allow and log (DISALLOW
)
-
-
- no: allow and do not log (
ALLOW
)
- yes:
(the constants are from Spam::SpamConstants
)
Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/33421
Screenshots or screen recordings
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Alex Buijs