Disable recommendations by default when requiring consent

The GDPR is open for interpretation, and it isn't clear whether showing
users recommended proposals and debates while browsing the site is
considered a notification that needs to be explicitly accepted.

Since we aren't sure whether this is necessary, we're taking the safe
approach and disabling recommendations by default.
This commit is contained in:
Johann
2025-10-08 15:35:13 +02:00
committed by Javi Martín
parent a1714fea58
commit 92a76dd46e
4 changed files with 41 additions and 4 deletions

View File

@@ -146,6 +146,34 @@ describe User do
end
end
describe "#recommended_debates" do
it "is true by default when the consent for notifications setting is disabled" do
Setting["feature.gdpr.require_consent_for_notifications"] = false
expect(build(:user).recommended_debates).to be true
end
it "is false by default when the consent for notifications setting is enabled" do
Setting["feature.gdpr.require_consent_for_notifications"] = true
expect(build(:user).recommended_debates).to be false
end
end
describe "#recommended_proposals" do
it "is true by default when the consent for notifications setting is disabled" do
Setting["feature.gdpr.require_consent_for_notifications"] = false
expect(build(:user).recommended_proposals).to be true
end
it "is false by default when the consent for notifications setting is enabled" do
Setting["feature.gdpr.require_consent_for_notifications"] = true
expect(build(:user).recommended_proposals).to be false
end
end
describe "#official_position_badge" do
it "is false by default" do
expect(subject.official_position_badge).to be false