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
This commit is contained in:
Diana Huang
2021-05-10 11:54:44 -04:00
parent 4854b2eb17
commit 451e4a23b6
27 changed files with 0 additions and 865 deletions

View File

@@ -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',
},
),
]

View File

@@ -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 = [

View File

@@ -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),
),
]

View File

@@ -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'),
),
]

View File

@@ -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
)
),
]

View File

@@ -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,
),
),
]

View File

@@ -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'),
),
]

View File

@@ -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),
),
]

View File

@@ -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.'),
),
]

View File

@@ -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),
),
]

View File

@@ -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.'),
),
]

View File

@@ -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),
),
]

View File

@@ -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.'),
),
]

View File

@@ -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.'),
),
]

View File

@@ -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',
),
]

View File

@@ -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),
),
]

View File

@@ -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),
),
]

View File

@@ -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',
),
]

View File

@@ -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.'),
),
]

View File

@@ -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),
]

View File

@@ -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',
),
]

View File

@@ -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.'),
),
]

View File

@@ -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'),
),
]

View File

@@ -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'),
),
]

View File

@@ -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'),
),
]

View File

@@ -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),
),
]

View File

@@ -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'),
),
]