From 451e4a23b61f45ba2ef06339bcee1415857b25da Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Mon, 10 May 2021 11:54:44 -0400 Subject: [PATCH] refactor: Remove squashed third_party_auth migrations. We squashed migrations in this djangoapp a while back. This is the followup work to remove the migrations that were squashed and to convert the squashed migration into a 'normal' migration. https://openedx.atlassian.net/browse/ARCHBOM-1177 --- .../migrations/0001_initial.py | 121 ------------------ .../0001_squashed_0026_auto_20200401_1932.py | 2 - .../0002_schema__provider_icon_image.py | 41 ------ .../0003_samlproviderconfig_debug_mode.py | 16 --- .../migrations/0004_add_visible_field.py | 64 --------- .../migrations/0005_add_site_field.py | 78 ----------- ...roviderconfig_automatic_refresh_enabled.py | 16 --- .../migrations/0007_auto_20170406_0912.py | 21 --- .../migrations/0008_auto_20170413_1455.py | 26 ---- .../migrations/0009_auto_20170415_1144.py | 26 ---- ...0010_add_skip_hinted_login_dialog_field.py | 26 ---- .../migrations/0011_auto_20170616_0112.py | 16 --- .../migrations/0012_auto_20170626_1135.py | 26 ---- .../0013_sync_learner_profile_data.py | 26 ---- .../migrations/0014_auto_20171222_1233.py | 23 ---- .../0015_samlproviderconfig_archived.py | 16 --- .../migrations/0016_auto_20180130_0938.py | 22 ---- ...emove_icon_class_image_secondary_fields.py | 26 ---- .../migrations/0018_auto_20180327_1631.py | 26 ---- .../migrations/0019_consolidate_slug.py | 54 -------- .../migrations/0020_cleanup_slug_fields.py | 22 ---- .../migrations/0021_sso_id_verification.py | 29 ----- .../migrations/0022_auto_20181012_0307.py | 39 ------ .../migrations/0023_auto_20190418_2033.py | 31 ----- .../migrations/0024_fix_edit_disallowed.py | 30 ----- .../migrations/0025_auto_20200303_1448.py | 21 --- .../migrations/0026_auto_20200401_1932.py | 21 --- 27 files changed, 865 deletions(-) delete mode 100644 common/djangoapps/third_party_auth/migrations/0001_initial.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0005_add_site_field.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0008_auto_20170413_1455.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0010_add_skip_hinted_login_dialog_field.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0012_auto_20170626_1135.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0013_sync_learner_profile_data.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0017_remove_icon_class_image_secondary_fields.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0023_auto_20190418_2033.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0025_auto_20200303_1448.py delete mode 100644 common/djangoapps/third_party_auth/migrations/0026_auto_20200401_1932.py diff --git a/common/djangoapps/third_party_auth/migrations/0001_initial.py b/common/djangoapps/third_party_auth/migrations/0001_initial.py deleted file mode 100644 index eb844f7a08..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0001_initial.py +++ /dev/null @@ -1,121 +0,0 @@ -import django.db.models.deletion -from openedx.core.lib.hash_utils import create_hash256 -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='LTIProviderConfig', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), - ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('icon_class', models.CharField(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(default='localhost', help_text='The domain that will be acting as the LTI consumer.', max_length=255, db_index=True)), - ('lti_consumer_secret', models.CharField(default=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, blank=True)), - ('lti_max_timestamp_age', models.IntegerField(default=10, help_text='The maximum age of oauth_timestamp values, in seconds.')), - ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), - ], - options={ - 'verbose_name': 'Provider Configuration (LTI)', - 'verbose_name_plural': 'Provider Configuration (LTI)', - }, - ), - migrations.CreateModel( - name='OAuth2ProviderConfig', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), - ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('icon_class', models.CharField(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(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, db_index=True)), - ('key', models.TextField(verbose_name='Client ID', blank=True)), - ('secret', models.TextField(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', blank=True)), - ('other_settings', models.TextField(help_text='Optional JSON object with advanced settings, if any.', blank=True)), - ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), - ], - options={ - 'verbose_name': 'Provider Configuration (OAuth)', - 'verbose_name_plural': 'Provider Configuration (OAuth)', - }, - ), - migrations.CreateModel( - name='SAMLConfiguration', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), - ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('private_key', models.TextField(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).', blank=True)), - ('public_key', models.TextField(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).", blank=True)), - ('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(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), - ], - options={ - 'verbose_name': 'SAML Configuration', - 'verbose_name_plural': 'SAML Configuration', - }, - ), - migrations.CreateModel( - name='SAMLProviderConfig', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), - ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('icon_class', models.CharField(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(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', blank=True)), - ('attr_full_name', models.CharField(help_text="URN of SAML attribute containing the user's full name. Leave blank for default.", max_length=128, verbose_name='Full Name Attribute', blank=True)), - ('attr_first_name', models.CharField(help_text="URN of SAML attribute containing the user's first name. Leave blank for default.", max_length=128, verbose_name='First Name Attribute', blank=True)), - ('attr_last_name', models.CharField(help_text="URN of SAML attribute containing the user's last name. Leave blank for default.", max_length=128, verbose_name='Last Name Attribute', blank=True)), - ('attr_username', models.CharField(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', blank=True)), - ('attr_email', models.CharField(help_text="URN of SAML attribute containing the user's email address[es]. Leave blank for default.", max_length=128, verbose_name='Email Attribute', blank=True)), - ('other_settings', models.TextField(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', blank=True)), - ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), - ], - options={ - 'verbose_name': 'Provider Configuration (SAML IdP)', - 'verbose_name_plural': 'Provider Configuration (SAML IdPs)', - }, - ), - migrations.CreateModel( - name='SAMLProviderData', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('fetched_at', models.DateTimeField(db_index=True)), - ('expires_at', models.DateTimeField(null=True, db_index=True)), - ('entity_id', models.CharField(max_length=255, db_index=True)), - ('sso_url', models.URLField(verbose_name='SSO URL')), - ('public_key', models.TextField()), - ], - options={ - 'ordering': ('-fetched_at',), - 'verbose_name': 'SAML Provider Data', - 'verbose_name_plural': 'SAML Provider Data', - }, - ), - ] 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 index adb27137f3..6b2de4549c 100644 --- 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 @@ -14,8 +14,6 @@ from common.djangoapps.third_party_auth import models as third_party_auth_models 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 = [ diff --git a/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py b/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py deleted file mode 100644 index 26031b8302..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0002_schema__provider_icon_image.py +++ /dev/null @@ -1,41 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='ltiproviderconfig', - name='icon_image', - field=models.FileField(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='', blank=True), - ), - migrations.AddField( - model_name='oauth2providerconfig', - name='icon_image', - field=models.FileField(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='', blank=True), - ), - migrations.AddField( - model_name='samlproviderconfig', - name='icon_image', - field=models.FileField(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='', blank=True), - ), - migrations.AlterField( - model_name='ltiproviderconfig', - name='icon_class', - field=models.CharField(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, blank=True), - ), - migrations.AlterField( - model_name='oauth2providerconfig', - name='icon_class', - field=models.CharField(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, blank=True), - ), - migrations.AlterField( - model_name='samlproviderconfig', - name='icon_class', - field=models.CharField(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, blank=True), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py b/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py deleted file mode 100644 index d63c35cb9c..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0003_samlproviderconfig_debug_mode.py +++ /dev/null @@ -1,16 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0002_schema__provider_icon_image'), - ] - - operations = [ - migrations.AddField( - model_name='samlproviderconfig', - name='debug_mode', - field=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'), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py b/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py deleted file mode 100644 index 32187da9da..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0004_add_visible_field.py +++ /dev/null @@ -1,64 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0001_initial'), - ('third_party_auth', '0002_schema__provider_icon_image'), - ('third_party_auth', '0003_samlproviderconfig_debug_mode'), - ] - - operations = [ - migrations.AddField( - model_name='LTIProviderConfig', - name='visible', - field=models.BooleanField( - 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.', - default=True - ), - preserve_default=False - ), - migrations.AlterField( - model_name='LTIProviderConfig', - name='visible', - field=models.BooleanField( - 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.', - default=False - ) - ), - migrations.AddField( - model_name='OAuth2ProviderConfig', - name='visible', - field=models.BooleanField( - 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.', - default=True - ), - preserve_default=False - ), - migrations.AlterField( - model_name='OAuth2ProviderConfig', - name='visible', - field=models.BooleanField( - 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.', - default=False - ) - ), - migrations.AddField( - model_name='SAMLProviderConfig', - name='visible', - field=models.BooleanField( - 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.', - default=True - ), - preserve_default=False - ), - migrations.AlterField( - model_name='SAMLProviderConfig', - name='visible', - field=models.BooleanField( - 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.', - default=False - ) - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0005_add_site_field.py b/common/djangoapps/third_party_auth/migrations/0005_add_site_field.py deleted file mode 100644 index 114078e3d2..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0005_add_site_field.py +++ /dev/null @@ -1,78 +0,0 @@ -from django.conf import settings -from django.db import migrations, models - - -def fill_oauth2_slug(apps, schema_editor): - """ - Fill in the provider_slug to be the same as backend_name for backwards compatability. - """ - OAuth2ProviderConfig = apps.get_model('third_party_auth', 'OAuth2ProviderConfig') - for config in OAuth2ProviderConfig.objects.all(): - config.provider_slug = config.backend_name - config.save() - - -class Migration(migrations.Migration): - - dependencies = [ - ('sites', '0001_initial'), - ('third_party_auth', '0004_add_visible_field'), - ] - - operations = [ - migrations.AddField( - model_name='oauth2providerconfig', - name='provider_slug', - field=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 - ), - preserve_default=False, - ), - migrations.RunPython(fill_oauth2_slug, reverse_code=migrations.RunPython.noop), - migrations.AddField( - model_name='ltiproviderconfig', - name='site', - field=models.ForeignKey( - related_name='ltiproviderconfigs', - default=settings.SITE_ID, - to='sites.Site', - help_text='The Site that this provider configuration belongs to.', - on_delete=models.CASCADE, - ), - ), - migrations.AddField( - model_name='oauth2providerconfig', - name='site', - field=models.ForeignKey( - related_name='oauth2providerconfigs', - default=settings.SITE_ID, - to='sites.Site', - help_text='The Site that this provider configuration belongs to.', - on_delete=models.CASCADE, - ), - ), - migrations.AddField( - model_name='samlproviderconfig', - name='site', - field=models.ForeignKey( - related_name='samlproviderconfigs', - default=settings.SITE_ID, - to='sites.Site', - help_text='The Site that this provider configuration belongs to.', - on_delete=models.CASCADE, - ), - ), - migrations.AddField( - model_name='samlconfiguration', - name='site', - field=models.ForeignKey( - related_name='samlconfigurations', - default=settings.SITE_ID, - to='sites.Site', - help_text='The Site that this SAML configuration belongs to.', - on_delete=models.CASCADE, - ), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py b/common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py deleted file mode 100644 index 0d113a2966..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0006_samlproviderconfig_automatic_refresh_enabled.py +++ /dev/null @@ -1,16 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0005_add_site_field'), - ] - - operations = [ - 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'), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py b/common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py deleted file mode 100644 index 808ed5c860..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0007_auto_20170406_0912.py +++ /dev/null @@ -1,21 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0006_samlproviderconfig_automatic_refresh_enabled'), - ] - - operations = [ - migrations.AddField( - model_name='samlproviderconfig', - name='identity_provider_type', - field=models.CharField(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', choices=[('standard_saml_provider', 'Standard SAML provider'), ('sap_success_factors', 'SAP SuccessFactors provider')]), - ), - migrations.AlterField( - model_name='samlproviderconfig', - name='other_settings', - field=models.TextField(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', blank=True), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0008_auto_20170413_1455.py b/common/djangoapps/third_party_auth/migrations/0008_auto_20170413_1455.py deleted file mode 100644 index b4916d62d5..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0008_auto_20170413_1455.py +++ /dev/null @@ -1,26 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0007_auto_20170406_0912'), - ] - - operations = [ - migrations.AddField( - model_name='ltiproviderconfig', - name='drop_existing_session', - field=models.BooleanField(default=False, help_text='Whether to drop an existing session when accessing a view decorated with third_party_auth.decorators.tpa_hint_ends_existing_session when a tpa_hint URL query parameter mapping to this provider is included in the request.'), - ), - migrations.AddField( - model_name='oauth2providerconfig', - name='drop_existing_session', - field=models.BooleanField(default=False, help_text='Whether to drop an existing session when accessing a view decorated with third_party_auth.decorators.tpa_hint_ends_existing_session when a tpa_hint URL query parameter mapping to this provider is included in the request.'), - ), - migrations.AddField( - model_name='samlproviderconfig', - name='drop_existing_session', - field=models.BooleanField(default=False, help_text='Whether to drop an existing session when accessing a view decorated with third_party_auth.decorators.tpa_hint_ends_existing_session when a tpa_hint URL query parameter mapping to this provider is included in the request.'), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py b/common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py deleted file mode 100644 index c8d1ec76c2..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0009_auto_20170415_1144.py +++ /dev/null @@ -1,26 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0008_auto_20170413_1455'), - ] - - operations = [ - migrations.AddField( - model_name='ltiproviderconfig', - name='max_session_length', - field=models.PositiveIntegerField(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)', blank=True), - ), - migrations.AddField( - model_name='oauth2providerconfig', - name='max_session_length', - field=models.PositiveIntegerField(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)', blank=True), - ), - migrations.AddField( - model_name='samlproviderconfig', - name='max_session_length', - field=models.PositiveIntegerField(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)', blank=True), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0010_add_skip_hinted_login_dialog_field.py b/common/djangoapps/third_party_auth/migrations/0010_add_skip_hinted_login_dialog_field.py deleted file mode 100644 index cef2143842..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0010_add_skip_hinted_login_dialog_field.py +++ /dev/null @@ -1,26 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0009_auto_20170415_1144'), - ] - - operations = [ - 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.'), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py b/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py deleted file mode 100644 index 3300a7f053..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0011_auto_20170616_0112.py +++ /dev/null @@ -1,16 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0010_add_skip_hinted_login_dialog_field'), - ] - - operations = [ - migrations.AlterField( - model_name='samlproviderconfig', - name='other_settings', - field=models.TextField(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', blank=True), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0012_auto_20170626_1135.py b/common/djangoapps/third_party_auth/migrations/0012_auto_20170626_1135.py deleted file mode 100644 index 60d38c2e83..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0012_auto_20170626_1135.py +++ /dev/null @@ -1,26 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0011_auto_20170616_0112'), - ] - - operations = [ - 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.'), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0013_sync_learner_profile_data.py b/common/djangoapps/third_party_auth/migrations/0013_sync_learner_profile_data.py deleted file mode 100644 index 339ec49562..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0013_sync_learner_profile_data.py +++ /dev/null @@ -1,26 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0012_auto_20170626_1135'), - ] - - operations = [ - 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.'), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py b/common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py deleted file mode 100644 index 3dceaaf375..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py +++ /dev/null @@ -1,23 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0013_sync_learner_profile_data'), - ] - - operations = [ - migrations.RemoveField( - model_name='ltiproviderconfig', - name='drop_existing_session', - ), - migrations.RemoveField( - model_name='oauth2providerconfig', - name='drop_existing_session', - ), - migrations.RemoveField( - model_name='samlproviderconfig', - name='drop_existing_session', - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py b/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py deleted file mode 100644 index 558294db11..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0015_samlproviderconfig_archived.py +++ /dev/null @@ -1,16 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0014_auto_20171222_1233'), - ] - - operations = [ - migrations.AddField( - model_name='samlproviderconfig', - name='archived', - field=models.BooleanField(default=False), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py b/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py deleted file mode 100644 index 42bde81127..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0016_auto_20180130_0938.py +++ /dev/null @@ -1,22 +0,0 @@ -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0015_samlproviderconfig_archived'), - ] - - operations = [ - 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(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='third_party_auth.SAMLConfiguration', null=True), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0017_remove_icon_class_image_secondary_fields.py b/common/djangoapps/third_party_auth/migrations/0017_remove_icon_class_image_secondary_fields.py deleted file mode 100644 index 65f2511a15..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0017_remove_icon_class_image_secondary_fields.py +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by Django 1.11.8 on 2018-01-30 17:38 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0016_auto_20180130_0938'), - ] - - operations = [ - migrations.RemoveField( - model_name='ltiproviderconfig', - name='icon_class', - ), - migrations.RemoveField( - model_name='ltiproviderconfig', - name='icon_image', - ), - migrations.RemoveField( - model_name='ltiproviderconfig', - name='secondary', - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py b/common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py deleted file mode 100644 index 14d2bc3de3..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0018_auto_20180327_1631.py +++ /dev/null @@ -1,26 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0017_remove_icon_class_image_secondary_fields'), - ] - - operations = [ - 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.'), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py b/common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py deleted file mode 100644 index 585f8cb0b0..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py +++ /dev/null @@ -1,54 +0,0 @@ -""" -Custom migration script to add slug field to all ProviderConfig models. -""" - - -from django.db import migrations, models -from django.utils.text import slugify - - -def fill_slug_field(apps, schema_editor): - """ - Fill in the slug field for each ProviderConfig class for backwards compatability. - """ - OAuth2ProviderConfig = apps.get_model('third_party_auth', 'OAuth2ProviderConfig') - SAMLProviderConfig = apps.get_model('third_party_auth', 'SAMLProviderConfig') - LTIProviderConfig = apps.get_model('third_party_auth', 'LTIProviderConfig') - - for config in OAuth2ProviderConfig.objects.all(): - config.slug = config.provider_slug - config.save() - - for config in SAMLProviderConfig.objects.all(): - config.slug = config.idp_slug - config.save() - - for config in LTIProviderConfig.objects.all(): - config.slug = slugify(config.lti_consumer_key) - config.save() - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0018_auto_20180327_1631'), - ] - - operations = [ - 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(fill_slug_field, reverse_code=migrations.RunPython.noop), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py b/common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py deleted file mode 100644 index cdf64d5799..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0020_cleanup_slug_fields.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 1.11.12 on 2018-04-10 13:57 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0019_consolidate_slug'), - ] - - operations = [ - migrations.RemoveField( - model_name='oauth2providerconfig', - name='provider_slug', - ), - migrations.RemoveField( - model_name='samlproviderconfig', - name='idp_slug', - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py b/common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py deleted file mode 100644 index e65ae7d25e..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0021_sso_id_verification.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 1.11.12 on 2018-04-11 15:33 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0020_cleanup_slug_fields'), - ] - - operations = [ - 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.'), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py b/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py deleted file mode 100644 index 9053fc9a41..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0022_auto_20181012_0307.py +++ /dev/null @@ -1,39 +0,0 @@ -# Generated by Django 1.11.15 on 2018-10-12 07:07 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0021_sso_id_verification'), - ] - - operations = [ - 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'), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0023_auto_20190418_2033.py b/common/djangoapps/third_party_auth/migrations/0023_auto_20190418_2033.py deleted file mode 100644 index 6b17e7c6ea..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0023_auto_20190418_2033.py +++ /dev/null @@ -1,31 +0,0 @@ -# Generated by Django 1.11.20 on 2019-04-18 20:33 - - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('organizations', '0006_auto_20171207_0259'), - ('third_party_auth', '0022_auto_20181012_0307'), - ] - - operations = [ - migrations.AddField( - model_name='ltiproviderconfig', - name='organization', - field=models.OneToOneField(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.OneToOneField(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.OneToOneField(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'), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py b/common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py deleted file mode 100644 index 4359ab1f68..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0024_fix_edit_disallowed.py +++ /dev/null @@ -1,30 +0,0 @@ -# Generated by Django 1.11.20 on 2019-05-20 20:13 - - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0023_auto_20190418_2033'), - ] - - operations = [ - migrations.AlterField( - 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.AlterField( - 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.AlterField( - 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'), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0025_auto_20200303_1448.py b/common/djangoapps/third_party_auth/migrations/0025_auto_20200303_1448.py deleted file mode 100644 index 9b57cbab45..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0025_auto_20200303_1448.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 1.11.28 on 2020-03-03 14:48 - - -from django.db import migrations, models - -import openedx.core.lib.hash_utils - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0024_fix_edit_disallowed'), - ] - - operations = [ - 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), - ), - ] diff --git a/common/djangoapps/third_party_auth/migrations/0026_auto_20200401_1932.py b/common/djangoapps/third_party_auth/migrations/0026_auto_20200401_1932.py deleted file mode 100644 index 7a5cf16ce9..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0026_auto_20200401_1932.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 2.0.13 on 2020-04-01 19:32 - -from django.db import migrations, models -import django.db.models.deletion - -from common.djangoapps.third_party_auth import models as third_party_auth_models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0025_auto_20200303_1448'), - ] - - operations = [ - 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'), - ), - ]