From 227df4e267fc090bb069a822340bc31febf7060d Mon Sep 17 00:00:00 2001
From: Diana Huang <dkh@edx.org>
Date: Tue, 14 Apr 2020 14:17:30 -0400
Subject: [PATCH] Auto-generated squashed migration.

---
 .../0001_squashed_0026_auto_20200401_1932.py  | 383 ++++++++++++++++++
 1 file changed, 383 insertions(+)
 create mode 100644 common/djangoapps/third_party_auth/migrations/0001_squashed_0026_auto_20200401_1932.py

diff --git a/common/djangoapps/third_party_auth/migrations/0001_squashed_0026_auto_20200401_1932.py b/common/djangoapps/third_party_auth/migrations/0001_squashed_0026_auto_20200401_1932.py
new file mode 100644
index 00000000000..791342903bd
--- /dev/null
+++ b/common/djangoapps/third_party_auth/migrations/0001_squashed_0026_auto_20200401_1932.py
@@ -0,0 +1,383 @@
+# Generated by Django 2.2.12 on 2020-04-14 18:16
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.migrations.operations.special
+import django.db.models.deletion
+import openedx.core.lib.hash_utils
+import third_party_auth.models
+
+
+# Functions from the following migrations need manual copying.
+# Move them and any dependencies into this file, then update the
+# RunPython operations to refer to the local versions:
+# third_party_auth.migrations.0005_add_site_field
+# third_party_auth.migrations.0019_consolidate_slug
+
+class Migration(migrations.Migration):
+
+    replaces = [('third_party_auth', '0001_initial'), ('third_party_auth', '0002_schema__provider_icon_image'), ('third_party_auth', '0003_samlproviderconfig_debug_mode'), ('third_party_auth', '0004_add_visible_field'), ('third_party_auth', '0005_add_site_field'), ('third_party_auth', '0006_samlproviderconfig_automatic_refresh_enabled'), ('third_party_auth', '0007_auto_20170406_0912'), ('third_party_auth', '0008_auto_20170413_1455'), ('third_party_auth', '0009_auto_20170415_1144'), ('third_party_auth', '0010_add_skip_hinted_login_dialog_field'), ('third_party_auth', '0011_auto_20170616_0112'), ('third_party_auth', '0012_auto_20170626_1135'), ('third_party_auth', '0013_sync_learner_profile_data'), ('third_party_auth', '0014_auto_20171222_1233'), ('third_party_auth', '0015_samlproviderconfig_archived'), ('third_party_auth', '0016_auto_20180130_0938'), ('third_party_auth', '0017_remove_icon_class_image_secondary_fields'), ('third_party_auth', '0018_auto_20180327_1631'), ('third_party_auth', '0019_consolidate_slug'), ('third_party_auth', '0020_cleanup_slug_fields'), ('third_party_auth', '0021_sso_id_verification'), ('third_party_auth', '0022_auto_20181012_0307'), ('third_party_auth', '0023_auto_20190418_2033'), ('third_party_auth', '0024_fix_edit_disallowed'), ('third_party_auth', '0025_auto_20200303_1448'), ('third_party_auth', '0026_auto_20200401_1932')]
+
+    initial = True
+
+    dependencies = [
+        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+        ('organizations', '0006_auto_20171207_0259'),
+        ('sites', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='SAMLConfiguration',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
+                ('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
+                ('private_key', models.TextField(blank=True, help_text='To generate a key pair as two files, run "openssl req -new -x509 -days 3652 -nodes -out saml.crt -keyout saml.key". Paste the contents of saml.key here. For increased security, you can avoid storing this in your database by leaving this field blank and setting it via the SOCIAL_AUTH_SAML_SP_PRIVATE_KEY setting in your instance\'s Django settings (or lms.auth.json).')),
+                ('public_key', models.TextField(blank=True, help_text="Public key certificate. For increased security, you can avoid storing this in your database by leaving this field blank and setting it via the SOCIAL_AUTH_SAML_SP_PUBLIC_CERT setting in your instance's Django settings (or lms.auth.json).")),
+                ('entity_id', models.CharField(default='http://saml.example.com', max_length=255, verbose_name='Entity ID')),
+                ('org_info_str', models.TextField(default='{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}', help_text="JSON dictionary of 'url', 'displayname', and 'name' for each language", verbose_name='Organization Info')),
+                ('other_config_str', models.TextField(default='{\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\n}', help_text='JSON object defining advanced settings that are passed on to python-saml. Valid keys that can be set here include: SECURITY_CONFIG and SP_EXTRA')),
+                ('changed_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Changed by')),
+            ],
+            options={
+                'verbose_name': 'SAML Configuration',
+                'verbose_name_plural': 'SAML Configuration',
+            },
+        ),
+        migrations.CreateModel(
+            name='SAMLProviderData',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('fetched_at', models.DateTimeField(db_index=True)),
+                ('expires_at', models.DateTimeField(db_index=True, null=True)),
+                ('entity_id', models.CharField(db_index=True, max_length=255)),
+                ('sso_url', models.URLField(verbose_name='SSO URL')),
+                ('public_key', models.TextField()),
+            ],
+            options={
+                'verbose_name': 'SAML Provider Data',
+                'ordering': ('-fetched_at',),
+                'verbose_name_plural': 'SAML Provider Data',
+            },
+        ),
+        migrations.CreateModel(
+            name='LTIProviderConfig',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
+                ('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
+                ('icon_class', models.CharField(blank=True, default='fa-sign-in', help_text='The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)),
+                ('name', models.CharField(help_text='Name of this provider (shown to users)', max_length=50)),
+                ('secondary', models.BooleanField(default=False, help_text='Secondary providers are displayed less prominently, in a separate list of "Institution" login providers.')),
+                ('skip_registration_form', models.BooleanField(default=False, help_text='If this option is enabled, users will not be asked to confirm their details (name, email, etc.) during the registration process. Only select this option for trusted providers that are known to provide accurate user information.')),
+                ('skip_email_verification', models.BooleanField(default=False, help_text='If this option is selected, users will not be required to confirm their email, and their account will be activated immediately upon registration.')),
+                ('lti_consumer_key', models.CharField(help_text='The name that the LTI Tool Consumer will use to identify itself', max_length=255)),
+                ('lti_hostname', models.CharField(db_index=True, default='localhost', help_text='The domain that  will be acting as the LTI consumer.', max_length=255)),
+                ('lti_consumer_secret', models.CharField(blank=True, default=openedx.core.lib.hash_utils.create_hash256, help_text='The shared secret that the LTI Tool Consumer will use to authenticate requests. Only this edX instance and this tool consumer instance should know this value. For increased security, you can avoid storing this in your database by leaving this field blank and setting SOCIAL_AUTH_LTI_CONSUMER_SECRETS = {"consumer key": "secret", ...} in your instance\'s Django setttigs (or lms.auth.json)', max_length=255)),
+                ('lti_max_timestamp_age', models.IntegerField(default=10, help_text='The maximum age of oauth_timestamp values, in seconds.')),
+                ('changed_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Changed by')),
+                ('icon_image', models.FileField(blank=True, help_text='If there is no Font Awesome icon available for this provider, upload a custom image. SVG images are recommended as they can scale to any size.', upload_to='')),
+                ('visible', models.BooleanField(default=False, help_text='If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.')),
+            ],
+            options={
+                'verbose_name': 'Provider Configuration (LTI)',
+                'verbose_name_plural': 'Provider Configuration (LTI)',
+            },
+        ),
+        migrations.CreateModel(
+            name='SAMLProviderConfig',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
+                ('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
+                ('icon_class', models.CharField(blank=True, default='fa-sign-in', help_text='The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)),
+                ('name', models.CharField(help_text='Name of this provider (shown to users)', max_length=50)),
+                ('secondary', models.BooleanField(default=False, help_text='Secondary providers are displayed less prominently, in a separate list of "Institution" login providers.')),
+                ('skip_registration_form', models.BooleanField(default=False, help_text='If this option is enabled, users will not be asked to confirm their details (name, email, etc.) during the registration process. Only select this option for trusted providers that are known to provide accurate user information.')),
+                ('skip_email_verification', models.BooleanField(default=False, help_text='If this option is selected, users will not be required to confirm their email, and their account will be activated immediately upon registration.')),
+                ('backend_name', models.CharField(default='tpa-saml', help_text="Which python-social-auth provider backend to use. 'tpa-saml' is the standard edX SAML backend.", max_length=50)),
+                ('idp_slug', models.SlugField(help_text='A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30)),
+                ('entity_id', models.CharField(help_text='Example: https://idp.testshib.org/idp/shibboleth', max_length=255, verbose_name='Entity ID')),
+                ('metadata_source', models.CharField(help_text="URL to this provider's XML metadata. Should be an HTTPS URL. Example: https://www.testshib.org/metadata/testshib-providers.xml", max_length=255)),
+                ('attr_user_permanent_id', models.CharField(blank=True, help_text='URN of the SAML attribute that we can use as a unique, persistent user ID. Leave blank for default.', max_length=128, verbose_name='User ID Attribute')),
+                ('attr_full_name', models.CharField(blank=True, help_text="URN of SAML attribute containing the user's full name. Leave blank for default.", max_length=128, verbose_name='Full Name Attribute')),
+                ('attr_first_name', models.CharField(blank=True, help_text="URN of SAML attribute containing the user's first name. Leave blank for default.", max_length=128, verbose_name='First Name Attribute')),
+                ('attr_last_name', models.CharField(blank=True, help_text="URN of SAML attribute containing the user's last name. Leave blank for default.", max_length=128, verbose_name='Last Name Attribute')),
+                ('attr_username', models.CharField(blank=True, help_text='URN of SAML attribute to use as a suggested username for this user. Leave blank for default.', max_length=128, verbose_name='Username Hint Attribute')),
+                ('attr_email', models.CharField(blank=True, help_text="URN of SAML attribute containing the user's email address[es]. Leave blank for default.", max_length=128, verbose_name='Email Attribute')),
+                ('other_settings', models.TextField(blank=True, help_text='For advanced use cases, enter a JSON object with addtional configuration. The tpa-saml backend supports only {"requiredEntitlements": ["urn:..."]} which can be used to require the presence of a specific eduPersonEntitlement.', verbose_name='Advanced settings')),
+                ('changed_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Changed by')),
+                ('icon_image', models.FileField(blank=True, help_text='If there is no Font Awesome icon available for this provider, upload a custom image. SVG images are recommended as they can scale to any size.', upload_to='')),
+                ('debug_mode', models.BooleanField(default=False, help_text='In debug mode, all SAML XML requests and responses will be logged. This is helpful for testing/setup but should always be disabled before users start using this provider.', verbose_name='Debug Mode')),
+                ('visible', models.BooleanField(default=False, help_text='If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.')),
+            ],
+            options={
+                'verbose_name': 'Provider Configuration (SAML IdP)',
+                'verbose_name_plural': 'Provider Configuration (SAML IdPs)',
+            },
+        ),
+        migrations.CreateModel(
+            name='OAuth2ProviderConfig',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
+                ('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
+                ('icon_class', models.CharField(blank=True, default='fa-sign-in', help_text='The Font Awesome (or custom) icon class to use on the login button for this provider. Examples: fa-google-plus, fa-facebook, fa-linkedin, fa-sign-in, fa-university', max_length=50)),
+                ('name', models.CharField(help_text='Name of this provider (shown to users)', max_length=50)),
+                ('secondary', models.BooleanField(default=False, help_text='Secondary providers are displayed less prominently, in a separate list of "Institution" login providers.')),
+                ('skip_registration_form', models.BooleanField(default=False, help_text='If this option is enabled, users will not be asked to confirm their details (name, email, etc.) during the registration process. Only select this option for trusted providers that are known to provide accurate user information.')),
+                ('skip_email_verification', models.BooleanField(default=False, help_text='If this option is selected, users will not be required to confirm their email, and their account will be activated immediately upon registration.')),
+                ('backend_name', models.CharField(db_index=True, help_text='Which python-social-auth OAuth2 provider backend to use. The list of backend choices is determined by the THIRD_PARTY_AUTH_BACKENDS setting.', max_length=50)),
+                ('key', models.TextField(blank=True, verbose_name='Client ID')),
+                ('secret', models.TextField(blank=True, help_text='For increased security, you can avoid storing this in your database by leaving  this field blank and setting SOCIAL_AUTH_OAUTH_SECRETS = {"(backend name)": "secret", ...} in your instance\'s Django settings (or lms.auth.json)', verbose_name='Client Secret')),
+                ('other_settings', models.TextField(blank=True, help_text='Optional JSON object with advanced settings, if any.')),
+                ('changed_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Changed by')),
+                ('icon_image', models.FileField(blank=True, help_text='If there is no Font Awesome icon available for this provider, upload a custom image. SVG images are recommended as they can scale to any size.', upload_to='')),
+                ('visible', models.BooleanField(default=False, help_text='If this option is not selected, users will not be presented with the provider as an option to authenticate with on the login screen, but manual authentication using the correct link is still possible.')),
+                ('provider_slug', models.SlugField(default='temp', help_text='A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30)),
+            ],
+            options={
+                'verbose_name': 'Provider Configuration (OAuth)',
+                'verbose_name_plural': 'Provider Configuration (OAuth)',
+            },
+        ),
+        migrations.RunPython(
+            code=third_party_auth.migrations.0005_add_site_field.fill_oauth2_slug,
+            reverse_code=django.db.migrations.operations.special.RunPython.noop,
+        ),
+        migrations.AddField(
+            model_name='ltiproviderconfig',
+            name='site',
+            field=models.ForeignKey(default=1, help_text='The Site that this provider configuration belongs to.', on_delete=django.db.models.deletion.CASCADE, related_name='ltiproviderconfigs', to='sites.Site'),
+        ),
+        migrations.AddField(
+            model_name='oauth2providerconfig',
+            name='site',
+            field=models.ForeignKey(default=1, help_text='The Site that this provider configuration belongs to.', on_delete=django.db.models.deletion.CASCADE, related_name='oauth2providerconfigs', to='sites.Site'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='site',
+            field=models.ForeignKey(default=1, help_text='The Site that this provider configuration belongs to.', on_delete=django.db.models.deletion.CASCADE, related_name='samlproviderconfigs', to='sites.Site'),
+        ),
+        migrations.AddField(
+            model_name='samlconfiguration',
+            name='site',
+            field=models.ForeignKey(default=1, help_text='The Site that this SAML configuration belongs to.', on_delete=django.db.models.deletion.CASCADE, related_name='samlconfigurations', to='sites.Site'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='automatic_refresh_enabled',
+            field=models.BooleanField(default=True, help_text="When checked, the SAML provider's metadata will be included in the automatic refresh job, if configured.", verbose_name='Enable automatic metadata refresh'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='identity_provider_type',
+            field=models.CharField(choices=[('standard_saml_provider', 'Standard SAML provider'), ('sap_success_factors', 'SAP SuccessFactors provider')], default='standard_saml_provider', help_text='Some SAML providers require special behavior. For example, SAP SuccessFactors SAML providers require an additional API call to retrieve user metadata not provided in the SAML response. Select the provider type which best matches your use case. If in doubt, choose the Standard SAML Provider type.', max_length=128, verbose_name='Identity Provider Type'),
+        ),
+        migrations.AlterField(
+            model_name='samlproviderconfig',
+            name='other_settings',
+            field=models.TextField(blank=True, help_text='For advanced use cases, enter a JSON object with addtional configuration. The tpa-saml backend supports only {"requiredEntitlements": ["urn:..."]} which can be used to require the presence of a specific eduPersonEntitlement. Custom provider types, as selected in the "Identity Provider Type" field, may make use of the information stored in this field for configuration.', verbose_name='Advanced settings'),
+        ),
+        migrations.AddField(
+            model_name='ltiproviderconfig',
+            name='max_session_length',
+            field=models.PositiveIntegerField(blank=True, default=None, help_text='If this option is set, then users logging in using this SSO provider will have their session length limited to no longer than this value. If set to 0 (zero), the session will expire upon the user closing their browser. If left blank, the Django platform session default length will be used.', null=True, verbose_name='Max session length (seconds)'),
+        ),
+        migrations.AddField(
+            model_name='oauth2providerconfig',
+            name='max_session_length',
+            field=models.PositiveIntegerField(blank=True, default=None, help_text='If this option is set, then users logging in using this SSO provider will have their session length limited to no longer than this value. If set to 0 (zero), the session will expire upon the user closing their browser. If left blank, the Django platform session default length will be used.', null=True, verbose_name='Max session length (seconds)'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='max_session_length',
+            field=models.PositiveIntegerField(blank=True, default=None, help_text='If this option is set, then users logging in using this SSO provider will have their session length limited to no longer than this value. If set to 0 (zero), the session will expire upon the user closing their browser. If left blank, the Django platform session default length will be used.', null=True, verbose_name='Max session length (seconds)'),
+        ),
+        migrations.AddField(
+            model_name='ltiproviderconfig',
+            name='skip_hinted_login_dialog',
+            field=models.BooleanField(default=False, help_text='If this option is enabled, users that visit a "TPA hinted" URL for this provider (e.g. a URL ending with `?tpa_hint=[provider_name]`) will be forwarded directly to the login URL of the provider instead of being first prompted with a login dialog.'),
+        ),
+        migrations.AddField(
+            model_name='oauth2providerconfig',
+            name='skip_hinted_login_dialog',
+            field=models.BooleanField(default=False, help_text='If this option is enabled, users that visit a "TPA hinted" URL for this provider (e.g. a URL ending with `?tpa_hint=[provider_name]`) will be forwarded directly to the login URL of the provider instead of being first prompted with a login dialog.'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='skip_hinted_login_dialog',
+            field=models.BooleanField(default=False, help_text='If this option is enabled, users that visit a "TPA hinted" URL for this provider (e.g. a URL ending with `?tpa_hint=[provider_name]`) will be forwarded directly to the login URL of the provider instead of being first prompted with a login dialog.'),
+        ),
+        migrations.AlterField(
+            model_name='samlproviderconfig',
+            name='other_settings',
+            field=models.TextField(blank=True, help_text='For advanced use cases, enter a JSON object with addtional configuration. The tpa-saml backend supports {"requiredEntitlements": ["urn:..."]}, which can be used to require the presence of a specific eduPersonEntitlement, and {"extra_field_definitions": [{"name": "...", "urn": "..."},...]}, which can be used to define registration form fields and the URNs that can be used to retrieve the relevant values from the SAML response. Custom provider types, as selected in the "Identity Provider Type" field, may make use of the information stored in this field for additional configuration.', verbose_name='Advanced settings'),
+        ),
+        migrations.AddField(
+            model_name='ltiproviderconfig',
+            name='send_to_registration_first',
+            field=models.BooleanField(default=False, help_text='If this option is selected, users will be directed to the registration page immediately after authenticating with the third party instead of the login page.'),
+        ),
+        migrations.AddField(
+            model_name='oauth2providerconfig',
+            name='send_to_registration_first',
+            field=models.BooleanField(default=False, help_text='If this option is selected, users will be directed to the registration page immediately after authenticating with the third party instead of the login page.'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='send_to_registration_first',
+            field=models.BooleanField(default=False, help_text='If this option is selected, users will be directed to the registration page immediately after authenticating with the third party instead of the login page.'),
+        ),
+        migrations.AddField(
+            model_name='ltiproviderconfig',
+            name='sync_learner_profile_data',
+            field=models.BooleanField(default=False, help_text='Synchronize user profile data received from the identity provider with the edX user account on each SSO login. The user will be notified if the email address associated with their account is changed as a part of this synchronization.'),
+        ),
+        migrations.AddField(
+            model_name='oauth2providerconfig',
+            name='sync_learner_profile_data',
+            field=models.BooleanField(default=False, help_text='Synchronize user profile data received from the identity provider with the edX user account on each SSO login. The user will be notified if the email address associated with their account is changed as a part of this synchronization.'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='sync_learner_profile_data',
+            field=models.BooleanField(default=False, help_text='Synchronize user profile data received from the identity provider with the edX user account on each SSO login. The user will be notified if the email address associated with their account is changed as a part of this synchronization.'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='archived',
+            field=models.BooleanField(default=False),
+        ),
+        migrations.AddField(
+            model_name='samlconfiguration',
+            name='slug',
+            field=models.SlugField(default='default', help_text='A short string uniquely identifying this configuration. Cannot contain spaces. Examples: "ubc", "mit-staging"', max_length=30),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='saml_configuration',
+            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='third_party_auth.SAMLConfiguration'),
+        ),
+        migrations.RemoveField(
+            model_name='ltiproviderconfig',
+            name='icon_class',
+        ),
+        migrations.RemoveField(
+            model_name='ltiproviderconfig',
+            name='icon_image',
+        ),
+        migrations.RemoveField(
+            model_name='ltiproviderconfig',
+            name='secondary',
+        ),
+        migrations.AddField(
+            model_name='ltiproviderconfig',
+            name='send_welcome_email',
+            field=models.BooleanField(default=False, help_text='If this option is selected, users will be sent a welcome email upon registration.'),
+        ),
+        migrations.AddField(
+            model_name='oauth2providerconfig',
+            name='send_welcome_email',
+            field=models.BooleanField(default=False, help_text='If this option is selected, users will be sent a welcome email upon registration.'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='send_welcome_email',
+            field=models.BooleanField(default=False, help_text='If this option is selected, users will be sent a welcome email upon registration.'),
+        ),
+        migrations.AddField(
+            model_name='ltiproviderconfig',
+            name='slug',
+            field=models.SlugField(default='default', help_text='A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30),
+        ),
+        migrations.AddField(
+            model_name='oauth2providerconfig',
+            name='slug',
+            field=models.SlugField(default='default', help_text='A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='slug',
+            field=models.SlugField(default='default', help_text='A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"', max_length=30),
+        ),
+        migrations.RunPython(
+            code=third_party_auth.migrations.0019_consolidate_slug.fill_slug_field,
+            reverse_code=django.db.migrations.operations.special.RunPython.noop,
+        ),
+        migrations.RemoveField(
+            model_name='oauth2providerconfig',
+            name='provider_slug',
+        ),
+        migrations.RemoveField(
+            model_name='samlproviderconfig',
+            name='idp_slug',
+        ),
+        migrations.AddField(
+            model_name='ltiproviderconfig',
+            name='enable_sso_id_verification',
+            field=models.BooleanField(default=False, help_text='Use the presence of a profile from a trusted third party as proof of identity verification.'),
+        ),
+        migrations.AddField(
+            model_name='oauth2providerconfig',
+            name='enable_sso_id_verification',
+            field=models.BooleanField(default=False, help_text='Use the presence of a profile from a trusted third party as proof of identity verification.'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='enable_sso_id_verification',
+            field=models.BooleanField(default=False, help_text='Use the presence of a profile from a trusted third party as proof of identity verification.'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='default_email',
+            field=models.CharField(blank=True, help_text='Default value for email to be used if not present in SAML response.', max_length=255, verbose_name='Default Value for Email'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='default_first_name',
+            field=models.CharField(blank=True, help_text='Default value for first name to be used if not present in SAML response.', max_length=255, verbose_name='Default Value for First Name'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='default_full_name',
+            field=models.CharField(blank=True, help_text='Default value for full name to be used if not present in SAML response.', max_length=255, verbose_name='Default Value for Full Name'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='default_last_name',
+            field=models.CharField(blank=True, help_text='Default value for last name to be used if not present in SAML response.', max_length=255, verbose_name='Default Value for Last Name'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='default_username',
+            field=models.CharField(blank=True, help_text='Default value for username to be used if not present in SAML response.', max_length=255, verbose_name='Default Value for Username'),
+        ),
+        migrations.AddField(
+            model_name='ltiproviderconfig',
+            name='organization',
+            field=models.ForeignKey(blank=True, help_text='optional. If this provider is an Organization, this attribute can be used reference users in that Organization', null=True, on_delete=django.db.models.deletion.CASCADE, to='organizations.Organization'),
+        ),
+        migrations.AddField(
+            model_name='oauth2providerconfig',
+            name='organization',
+            field=models.ForeignKey(blank=True, help_text='optional. If this provider is an Organization, this attribute can be used reference users in that Organization', null=True, on_delete=django.db.models.deletion.CASCADE, to='organizations.Organization'),
+        ),
+        migrations.AddField(
+            model_name='samlproviderconfig',
+            name='organization',
+            field=models.ForeignKey(blank=True, help_text='optional. If this provider is an Organization, this attribute can be used reference users in that Organization', null=True, on_delete=django.db.models.deletion.CASCADE, to='organizations.Organization'),
+        ),
+        migrations.AlterField(
+            model_name='ltiproviderconfig',
+            name='lti_consumer_secret',
+            field=models.CharField(blank=True, default=openedx.core.lib.hash_utils.create_hash256, help_text='The shared secret that the LTI Tool Consumer will use to authenticate requests. Only this edX instance and this tool consumer instance should know this value. For increased security, you can avoid storing this in your database by leaving this field blank and setting SOCIAL_AUTH_LTI_CONSUMER_SECRETS = {"consumer key": "secret", ...} in your instance\'s Django setttigs (or lms.auth.json)', max_length=255),
+        ),
+        migrations.AlterField(
+            model_name='samlproviderconfig',
+            name='saml_configuration',
+            field=models.ForeignKey(blank=True, limit_choices_to=third_party_auth.models.active_saml_configurations_filter, null=True, on_delete=django.db.models.deletion.SET_NULL, to='third_party_auth.SAMLConfiguration'),
+        ),
+    ]
-- 
GitLab