diff --git a/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_marketing_emails_optional.py b/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_marketing_emails_optional.py new file mode 100644 index 000000000000..d701a337feb3 --- /dev/null +++ b/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_marketing_emails_optional.py @@ -0,0 +1,27 @@ +# Generated migration for adding marketing emails opt-in optional configuration field + +from django.db import migrations, models +import django.utils.translation + + +class Migration(migrations.Migration): + + dependencies = [ + ('third_party_auth', '0014_samlproviderconfig_optional_email_checkboxes'), + ] + + operations = [ + migrations.AddField( + model_name='samlproviderconfig', + name='marketing_emails_opt_in_optional', + field=models.BooleanField( + default=True, + help_text=django.utils.translation.gettext_lazy( + "If enabled, the marketing emails opt-in checkbox will be optional (not required) " + "and will default to unchecked (False) during registration for users authenticating " + "via this provider. This gives users explicit control over marketing email preferences " + "without forcing them to opt-in." + ), + ), + ), + ] diff --git a/common/djangoapps/third_party_auth/models.py b/common/djangoapps/third_party_auth/models.py index d3beafb4db88..49a79ec6272a 100644 --- a/common/djangoapps/third_party_auth/models.py +++ b/common/djangoapps/third_party_auth/models.py @@ -753,6 +753,15 @@ class SAMLProviderConfig(ProviderConfig): "are skipped, their values are inferred as False (opted out)." ), ) + marketing_emails_opt_in_optional = models.BooleanField( + default=True, + help_text=_( + "If enabled, the marketing emails opt-in checkbox will be optional (not required) " + "and will default to unchecked (False) during registration for users authenticating " + "via this provider. This gives users explicit control over marketing email preferences " + "without forcing them to opt-in." + ), + ) other_settings = models.TextField( verbose_name="Advanced settings", blank=True, help_text=(