BOM-933: Fix type mismatches in various migrations 5 (#22147)
* fix type mismatch in third_party_auth migrations * fix type mismatch in verify_student migrations * fix type mismatch in video_config migrations * fix type mismatch in verified_track_content migrations * fix type mismatch in commercemigrations * fix type mismatch in xblock_config migrations * fix type mismatch in course_creators migrations * fix type mismatch in contentstore migrations
This commit is contained in:
@@ -32,7 +32,7 @@ class Migration(migrations.Migration):
|
||||
('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')),
|
||||
('profile_whitelist', models.TextField(help_text=b'A comma-separated list of names of profiles to include in video encoding downloads.', blank=True)),
|
||||
('profile_whitelist', models.TextField(help_text=u'A comma-separated list of names of profiles to include in video encoding downloads.', 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={
|
||||
|
||||
@@ -16,7 +16,7 @@ class VideoUploadConfig(ConfigurationModel):
|
||||
"""
|
||||
profile_whitelist = TextField(
|
||||
blank=True,
|
||||
help_text="A comma-separated list of names of profiles to include in video encoding downloads."
|
||||
help_text=u"A comma-separated list of names of profiles to include in video encoding downloads."
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -16,8 +16,8 @@ class Migration(migrations.Migration):
|
||||
name='CourseCreator',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('state_changed', models.DateTimeField(help_text='The date when state was last updated', verbose_name=b'state last updated', auto_now_add=True)),
|
||||
('state', models.CharField(default=b'unrequested', help_text='Current course creator state', max_length=24, choices=[(b'unrequested', 'unrequested'), (b'pending', 'pending'), (b'granted', 'granted'), (b'denied', 'denied')])),
|
||||
('state_changed', models.DateTimeField(help_text='The date when state was last updated', verbose_name=u'state last updated', auto_now_add=True)),
|
||||
('state', models.CharField(default=u'unrequested', help_text='Current course creator state', max_length=24, choices=[(u'unrequested', 'unrequested'), (u'pending', 'pending'), (u'granted', 'granted'), (u'denied', 'denied')])),
|
||||
('note', models.CharField(help_text='Optional notes about this user (for example, why course creation access was denied)', max_length=512, blank=True)),
|
||||
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, help_text='Studio user', on_delete=models.CASCADE)),
|
||||
],
|
||||
|
||||
@@ -28,10 +28,10 @@ class CourseCreator(models.Model):
|
||||
|
||||
.. no_pii:
|
||||
"""
|
||||
UNREQUESTED = 'unrequested'
|
||||
PENDING = 'pending'
|
||||
GRANTED = 'granted'
|
||||
DENIED = 'denied'
|
||||
UNREQUESTED = u'unrequested'
|
||||
PENDING = u'pending'
|
||||
GRANTED = u'granted'
|
||||
DENIED = u'denied'
|
||||
|
||||
# Second value is the "human-readable" version.
|
||||
STATES = (
|
||||
@@ -42,7 +42,7 @@ class CourseCreator(models.Model):
|
||||
)
|
||||
|
||||
user = models.OneToOneField(User, help_text=_("Studio user"), on_delete=models.CASCADE)
|
||||
state_changed = models.DateTimeField('state last updated', auto_now_add=True,
|
||||
state_changed = models.DateTimeField(u'state last updated', auto_now_add=True,
|
||||
help_text=_("The date when state was last updated"))
|
||||
state = models.CharField(max_length=24, blank=False, choices=STATES, default=UNREQUESTED,
|
||||
help_text=_("Current course creator state"))
|
||||
|
||||
@@ -19,7 +19,7 @@ class Migration(migrations.Migration):
|
||||
('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')),
|
||||
('disabled_blocks', models.TextField(default=b'about course_info static_tab', help_text=b'Space-separated list of XBlocks on which XBlockAsides should never render in studio')),
|
||||
('disabled_blocks', models.TextField(default='about course_info static_tab', help_text='Space-separated list of XBlocks on which XBlockAsides should never render in studio')),
|
||||
('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={
|
||||
|
||||
@@ -23,8 +23,8 @@ class StudioConfig(ConfigurationModel):
|
||||
.. no_pii:
|
||||
"""
|
||||
disabled_blocks = TextField(
|
||||
default="about course_info static_tab",
|
||||
help_text="Space-separated list of XBlocks on which XBlockAsides should never render in studio",
|
||||
default=u"about course_info static_tab",
|
||||
help_text=u"Space-separated list of XBlocks on which XBlockAsides should never render in studio",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -21,15 +21,15 @@ class Migration(migrations.Migration):
|
||||
('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=b'fa-sign-in', help_text=b'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=b'Name of this provider (shown to users)', max_length=50)),
|
||||
('icon_class', models.CharField(default=u'fa-sign-in', help_text=u'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=u'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=b'The name that the LTI Tool Consumer will use to identify itself', max_length=255)),
|
||||
('lti_hostname', models.CharField(default=b'localhost', help_text=b'The domain that will be acting as the LTI consumer.', max_length=255, db_index=True)),
|
||||
('lti_consumer_secret', models.CharField(default=provider.utils.long_token, help_text=b'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=b'The maximum age of oauth_timestamp values, in seconds.')),
|
||||
('lti_consumer_key', models.CharField(help_text=u'The name that the LTI Tool Consumer will use to identify itself', max_length=255)),
|
||||
('lti_hostname', models.CharField(default=u'localhost', help_text=u'The domain that will be acting as the LTI consumer.', max_length=255, db_index=True)),
|
||||
('lti_consumer_secret', models.CharField(default=provider.utils.long_token, help_text=u'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=u'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={
|
||||
@@ -43,15 +43,15 @@ class Migration(migrations.Migration):
|
||||
('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=b'fa-sign-in', help_text=b'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=b'Name of this provider (shown to users)', max_length=50)),
|
||||
('icon_class', models.CharField(default=u'fa-sign-in', help_text=u'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=u'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=b'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=b'Client ID', blank=True)),
|
||||
('secret', models.TextField(help_text=b'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=b'Client Secret', blank=True)),
|
||||
('other_settings', models.TextField(help_text=b'Optional JSON object with advanced settings, if any.', blank=True)),
|
||||
('backend_name', models.CharField(help_text=u'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=u'Client ID', blank=True)),
|
||||
('secret', models.TextField(help_text=u'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=u'Client Secret', blank=True)),
|
||||
('other_settings', models.TextField(help_text=u'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={
|
||||
@@ -63,7 +63,7 @@ class Migration(migrations.Migration):
|
||||
name='ProviderApiPermissions',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('provider_id', models.CharField(help_text=b'Uniquely identify a provider. This is different from backend_name.', max_length=255)),
|
||||
('provider_id', models.CharField(help_text=u'Uniquely identify a provider. This is different from backend_name.', max_length=255)),
|
||||
('client', models.ForeignKey(to='oauth2.Client', on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
@@ -77,11 +77,11 @@ class Migration(migrations.Migration):
|
||||
('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=b'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=b"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=b'http://saml.example.com', max_length=255, verbose_name=b'Entity ID')),
|
||||
('org_info_str', models.TextField(default=b'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}', help_text=b"JSON dictionary of 'url', 'displayname', and 'name' for each language", verbose_name=b'Organization Info')),
|
||||
('other_config_str', models.TextField(default=b'{\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\n}', help_text=b'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')),
|
||||
('private_key', models.TextField(help_text=u'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=u"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=u'http://saml.example.com', max_length=255, verbose_name=u'Entity ID')),
|
||||
('org_info_str', models.TextField(default=u'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}', help_text=u"JSON dictionary of 'url', 'displayname', and 'name' for each language", verbose_name=u'Organization Info')),
|
||||
('other_config_str', models.TextField(default=u'{\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\n}', help_text=u'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={
|
||||
@@ -95,22 +95,22 @@ class Migration(migrations.Migration):
|
||||
('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=b'fa-sign-in', help_text=b'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=b'Name of this provider (shown to users)', max_length=50)),
|
||||
('icon_class', models.CharField(default=u'fa-sign-in', help_text=u'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=u'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=b'tpa-saml', help_text=b"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=b'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=b'Example: https://idp.testshib.org/idp/shibboleth', max_length=255, verbose_name=b'Entity ID')),
|
||||
('metadata_source', models.CharField(help_text=b"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=b'URN of the SAML attribute that we can use as a unique, persistent user ID. Leave blank for default.', max_length=128, verbose_name=b'User ID Attribute', blank=True)),
|
||||
('attr_full_name', models.CharField(help_text=b"URN of SAML attribute containing the user's full name. Leave blank for default.", max_length=128, verbose_name=b'Full Name Attribute', blank=True)),
|
||||
('attr_first_name', models.CharField(help_text=b"URN of SAML attribute containing the user's first name. Leave blank for default.", max_length=128, verbose_name=b'First Name Attribute', blank=True)),
|
||||
('attr_last_name', models.CharField(help_text=b"URN of SAML attribute containing the user's last name. Leave blank for default.", max_length=128, verbose_name=b'Last Name Attribute', blank=True)),
|
||||
('attr_username', models.CharField(help_text=b'URN of SAML attribute to use as a suggested username for this user. Leave blank for default.', max_length=128, verbose_name=b'Username Hint Attribute', blank=True)),
|
||||
('attr_email', models.CharField(help_text=b"URN of SAML attribute containing the user's email address[es]. Leave blank for default.", max_length=128, verbose_name=b'Email Attribute', blank=True)),
|
||||
('other_settings', models.TextField(help_text=b'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=b'Advanced settings', blank=True)),
|
||||
('backend_name', models.CharField(default=u'tpa-saml', help_text=u"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=u'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=u'Example: https://idp.testshib.org/idp/shibboleth', max_length=255, verbose_name=u'Entity ID')),
|
||||
('metadata_source', models.CharField(help_text=u"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=u'URN of the SAML attribute that we can use as a unique, persistent user ID. Leave blank for default.', max_length=128, verbose_name=u'User ID Attribute', blank=True)),
|
||||
('attr_full_name', models.CharField(help_text=u"URN of SAML attribute containing the user's full name. Leave blank for default.", max_length=128, verbose_name=u'Full Name Attribute', blank=True)),
|
||||
('attr_first_name', models.CharField(help_text=u"URN of SAML attribute containing the user's first name. Leave blank for default.", max_length=128, verbose_name=u'First Name Attribute', blank=True)),
|
||||
('attr_last_name', models.CharField(help_text=u"URN of SAML attribute containing the user's last name. Leave blank for default.", max_length=128, verbose_name=u'Last Name Attribute', blank=True)),
|
||||
('attr_username', models.CharField(help_text=u'URN of SAML attribute to use as a suggested username for this user. Leave blank for default.', max_length=128, verbose_name=u'Username Hint Attribute', blank=True)),
|
||||
('attr_email', models.CharField(help_text=u"URN of SAML attribute containing the user's email address[es]. Leave blank for default.", max_length=128, verbose_name=u'Email Attribute', blank=True)),
|
||||
('other_settings', models.TextField(help_text=u'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=u'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={
|
||||
@@ -125,7 +125,7 @@ class Migration(migrations.Migration):
|
||||
('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=b'SSO URL')),
|
||||
('sso_url', models.URLField(verbose_name=u'SSO URL')),
|
||||
('public_key', models.TextField()),
|
||||
],
|
||||
options={
|
||||
|
||||
@@ -14,31 +14,31 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='ltiproviderconfig',
|
||||
name='icon_image',
|
||||
field=models.FileField(help_text=b'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=b'', blank=True),
|
||||
field=models.FileField(help_text=u'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=u'', blank=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='oauth2providerconfig',
|
||||
name='icon_image',
|
||||
field=models.FileField(help_text=b'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=b'', blank=True),
|
||||
field=models.FileField(help_text=u'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=u'', blank=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='samlproviderconfig',
|
||||
name='icon_image',
|
||||
field=models.FileField(help_text=b'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=b'', blank=True),
|
||||
field=models.FileField(help_text=u'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=u'', blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='ltiproviderconfig',
|
||||
name='icon_class',
|
||||
field=models.CharField(default=b'fa-sign-in', help_text=b'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),
|
||||
field=models.CharField(default=u'fa-sign-in', help_text=u'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=b'fa-sign-in', help_text=b'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),
|
||||
field=models.CharField(default=u'fa-sign-in', help_text=u'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=b'fa-sign-in', help_text=b'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),
|
||||
field=models.CharField(default=u'fa-sign-in', help_text=u'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),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -14,6 +14,6 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='samlproviderconfig',
|
||||
name='debug_mode',
|
||||
field=models.BooleanField(default=False, help_text=b'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=b'Debug Mode'),
|
||||
field=models.BooleanField(default=False, help_text=u'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=u'Debug Mode'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -17,7 +17,7 @@ class Migration(migrations.Migration):
|
||||
model_name='LTIProviderConfig',
|
||||
name='visible',
|
||||
field=models.BooleanField(
|
||||
help_text=b'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.',
|
||||
help_text=u'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
|
||||
@@ -26,7 +26,7 @@ class Migration(migrations.Migration):
|
||||
model_name='LTIProviderConfig',
|
||||
name='visible',
|
||||
field=models.BooleanField(
|
||||
help_text=b'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.',
|
||||
help_text=u'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
|
||||
)
|
||||
),
|
||||
@@ -34,7 +34,7 @@ class Migration(migrations.Migration):
|
||||
model_name='OAuth2ProviderConfig',
|
||||
name='visible',
|
||||
field=models.BooleanField(
|
||||
help_text=b'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.',
|
||||
help_text=u'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
|
||||
@@ -43,7 +43,7 @@ class Migration(migrations.Migration):
|
||||
model_name='OAuth2ProviderConfig',
|
||||
name='visible',
|
||||
field=models.BooleanField(
|
||||
help_text=b'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.',
|
||||
help_text=u'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
|
||||
)
|
||||
),
|
||||
@@ -51,7 +51,7 @@ class Migration(migrations.Migration):
|
||||
model_name='SAMLProviderConfig',
|
||||
name='visible',
|
||||
field=models.BooleanField(
|
||||
help_text=b'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.',
|
||||
help_text=u'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
|
||||
@@ -60,7 +60,7 @@ class Migration(migrations.Migration):
|
||||
model_name='SAMLProviderConfig',
|
||||
name='visible',
|
||||
field=models.BooleanField(
|
||||
help_text=b'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.',
|
||||
help_text=u'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
|
||||
)
|
||||
),
|
||||
|
||||
@@ -28,7 +28,7 @@ class Migration(migrations.Migration):
|
||||
name='provider_slug',
|
||||
field=models.SlugField(
|
||||
default='temp',
|
||||
help_text=b'A short string uniquely identifying this provider. Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"',
|
||||
help_text=u'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,
|
||||
|
||||
@@ -14,6 +14,6 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='samlproviderconfig',
|
||||
name='automatic_refresh_enabled',
|
||||
field=models.BooleanField(default=True, help_text=b"When checked, the SAML provider's metadata will be included in the automatic refresh job, if configured.", verbose_name=b'Enable automatic metadata refresh'),
|
||||
field=models.BooleanField(default=True, help_text=u"When checked, the SAML provider's metadata will be included in the automatic refresh job, if configured.", verbose_name=u'Enable automatic metadata refresh'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -14,11 +14,11 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='samlproviderconfig',
|
||||
name='identity_provider_type',
|
||||
field=models.CharField(default=b'standard_saml_provider', help_text=b'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=b'Identity Provider Type', choices=[(b'standard_saml_provider', b'Standard SAML provider'), (b'sap_success_factors', b'SAP SuccessFactors provider')]),
|
||||
field=models.CharField(default=u'standard_saml_provider', help_text=u'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=u'Identity Provider Type', choices=[(u'standard_saml_provider', u'Standard SAML provider'), (u'sap_success_factors', u'SAP SuccessFactors provider')]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='samlproviderconfig',
|
||||
name='other_settings',
|
||||
field=models.TextField(help_text=b'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=b'Advanced settings', blank=True),
|
||||
field=models.TextField(help_text=u'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=u'Advanced settings', blank=True),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -14,16 +14,16 @@ class Migration(migrations.Migration):
|
||||
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=b'Max session length (seconds)', blank=True),
|
||||
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=u'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=b'Max session length (seconds)', blank=True),
|
||||
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=u'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=b'Max session length (seconds)', blank=True),
|
||||
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=u'Max session length (seconds)', blank=True),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -14,6 +14,6 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='samlproviderconfig',
|
||||
name='other_settings',
|
||||
field=models.TextField(help_text=b'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=b'Advanced settings', blank=True),
|
||||
field=models.TextField(help_text=u'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=u'Advanced settings', blank=True),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -15,7 +15,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='samlconfiguration',
|
||||
name='slug',
|
||||
field=models.SlugField(default=b'default', help_text=b'A short string uniquely identifying this configuration. Cannot contain spaces. Examples: "ubc", "mit-staging"', max_length=30),
|
||||
field=models.SlugField(default=u'default', help_text=u'A short string uniquely identifying this configuration. Cannot contain spaces. Examples: "ubc", "mit-staging"', max_length=30),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='samlproviderconfig',
|
||||
|
||||
@@ -39,17 +39,17 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='ltiproviderconfig',
|
||||
name='slug',
|
||||
field=models.SlugField(default=b'default', help_text=b'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),
|
||||
field=models.SlugField(default=u'default', help_text=u'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=b'default', help_text=b'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),
|
||||
field=models.SlugField(default=u'default', help_text=u'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=b'default', help_text=b'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),
|
||||
field=models.SlugField(default=u'default', help_text=u'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),
|
||||
]
|
||||
|
||||
@@ -15,16 +15,16 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='ltiproviderconfig',
|
||||
name='enable_sso_id_verification',
|
||||
field=models.BooleanField(default=False, help_text=b'Use the presence of a profile from a trusted third party as proof of identity verification.'),
|
||||
field=models.BooleanField(default=False, help_text=u'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=b'Use the presence of a profile from a trusted third party as proof of identity verification.'),
|
||||
field=models.BooleanField(default=False, help_text=u'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=b'Use the presence of a profile from a trusted third party as proof of identity verification.'),
|
||||
field=models.BooleanField(default=False, help_text=u'Use the presence of a profile from a trusted third party as proof of identity verification.'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -15,26 +15,26 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='samlproviderconfig',
|
||||
name='default_email',
|
||||
field=models.CharField(blank=True, help_text=b'Default value for email to be used if not present in SAML response.', max_length=255, verbose_name=b'Default Value for Email'),
|
||||
field=models.CharField(blank=True, help_text=u'Default value for email to be used if not present in SAML response.', max_length=255, verbose_name=u'Default Value for Email'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='samlproviderconfig',
|
||||
name='default_first_name',
|
||||
field=models.CharField(blank=True, help_text=b'Default value for first name to be used if not present in SAML response.', max_length=255, verbose_name=b'Default Value for First Name'),
|
||||
field=models.CharField(blank=True, help_text=u'Default value for first name to be used if not present in SAML response.', max_length=255, verbose_name=u'Default Value for First Name'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='samlproviderconfig',
|
||||
name='default_full_name',
|
||||
field=models.CharField(blank=True, help_text=b'Default value for full name to be used if not present in SAML response.', max_length=255, verbose_name=b'Default Value for Full Name'),
|
||||
field=models.CharField(blank=True, help_text=u'Default value for full name to be used if not present in SAML response.', max_length=255, verbose_name=u'Default Value for Full Name'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='samlproviderconfig',
|
||||
name='default_last_name',
|
||||
field=models.CharField(blank=True, help_text=b'Default value for last name to be used if not present in SAML response.', max_length=255, verbose_name=b'Default Value for Last Name'),
|
||||
field=models.CharField(blank=True, help_text=u'Default value for last name to be used if not present in SAML response.', max_length=255, verbose_name=u'Default Value for Last Name'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='samlproviderconfig',
|
||||
name='default_username',
|
||||
field=models.CharField(blank=True, help_text=b'Default value for username to be used if not present in SAML response.', max_length=255, verbose_name=b'Default Value for Username'),
|
||||
field=models.CharField(blank=True, help_text=u'Default value for username to be used if not present in SAML response.', max_length=255, verbose_name=u'Default Value for Username'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -95,9 +95,9 @@ class ProviderConfig(ConfigurationModel):
|
||||
icon_class = models.CharField(
|
||||
max_length=50,
|
||||
blank=True,
|
||||
default='fa-sign-in',
|
||||
default=u'fa-sign-in',
|
||||
help_text=(
|
||||
'The Font Awesome (or custom) icon class to use on the login button for this provider. '
|
||||
u'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'
|
||||
),
|
||||
)
|
||||
@@ -108,15 +108,15 @@ class ProviderConfig(ConfigurationModel):
|
||||
icon_image = models.FileField(
|
||||
blank=True,
|
||||
help_text=(
|
||||
'If there is no Font Awesome icon available for this provider, upload a custom image. '
|
||||
u'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.'
|
||||
),
|
||||
)
|
||||
name = models.CharField(max_length=50, blank=False, help_text="Name of this provider (shown to users)")
|
||||
name = models.CharField(max_length=50, blank=False, help_text=u"Name of this provider (shown to users)")
|
||||
slug = models.SlugField(
|
||||
max_length=30, db_index=True, default='default',
|
||||
max_length=30, db_index=True, default=u'default',
|
||||
help_text=(
|
||||
'A short string uniquely identifying this provider. '
|
||||
u'A short string uniquely identifying this provider. '
|
||||
'Cannot contain spaces and should be a usable as a CSS class. Examples: "ubc", "mit-staging"'
|
||||
))
|
||||
secondary = models.BooleanField(
|
||||
@@ -186,7 +186,7 @@ class ProviderConfig(ConfigurationModel):
|
||||
null=True,
|
||||
blank=True,
|
||||
default=None,
|
||||
verbose_name='Max session length (seconds)',
|
||||
verbose_name=u'Max session length (seconds)',
|
||||
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), "
|
||||
@@ -211,7 +211,7 @@ class ProviderConfig(ConfigurationModel):
|
||||
)
|
||||
enable_sso_id_verification = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Use the presence of a profile from a trusted third party as proof of identity verification.",
|
||||
help_text=u"Use the presence of a profile from a trusted third party as proof of identity verification.",
|
||||
)
|
||||
prefix = None # used for provider_id. Set to a string value in subclass
|
||||
backend_name = None # Set to a field or fixed value in subclass
|
||||
@@ -354,28 +354,28 @@ class OAuth2ProviderConfig(ProviderConfig):
|
||||
backend_name = models.CharField(
|
||||
max_length=50, blank=False, db_index=True,
|
||||
help_text=(
|
||||
"Which python-social-auth OAuth2 provider backend to use. "
|
||||
u"Which python-social-auth OAuth2 provider backend to use. "
|
||||
"The list of backend choices is determined by the THIRD_PARTY_AUTH_BACKENDS setting."
|
||||
# To be precise, it's set by AUTHENTICATION_BACKENDS
|
||||
# which production.py sets from THIRD_PARTY_AUTH_BACKENDS
|
||||
)
|
||||
)
|
||||
key = models.TextField(blank=True, verbose_name="Client ID")
|
||||
key = models.TextField(blank=True, verbose_name=u"Client ID")
|
||||
secret = models.TextField(
|
||||
blank=True,
|
||||
verbose_name="Client Secret",
|
||||
verbose_name=u"Client Secret",
|
||||
help_text=(
|
||||
'For increased security, you can avoid storing this in your database by leaving '
|
||||
u'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", ...} ' # pylint: disable=unicode-format-string
|
||||
'in your instance\'s Django settings (or lms.auth.json)'
|
||||
)
|
||||
)
|
||||
other_settings = models.TextField(blank=True, help_text="Optional JSON object with advanced settings, if any.")
|
||||
other_settings = models.TextField(blank=True, help_text=u"Optional JSON object with advanced settings, if any.")
|
||||
|
||||
class Meta(object):
|
||||
app_label = "third_party_auth"
|
||||
verbose_name = "Provider Configuration (OAuth)"
|
||||
verbose_name = u"Provider Configuration (OAuth)"
|
||||
verbose_name_plural = verbose_name
|
||||
|
||||
def clean(self):
|
||||
@@ -419,15 +419,15 @@ class SAMLConfiguration(ConfigurationModel):
|
||||
)
|
||||
slug = models.SlugField(
|
||||
max_length=30,
|
||||
default='default',
|
||||
default=u'default',
|
||||
help_text=(
|
||||
'A short string uniquely identifying this configuration. '
|
||||
u'A short string uniquely identifying this configuration. '
|
||||
'Cannot contain spaces. Examples: "ubc", "mit-staging"'
|
||||
),
|
||||
)
|
||||
private_key = models.TextField(
|
||||
help_text=(
|
||||
'To generate a key pair as two files, run '
|
||||
u'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 '
|
||||
@@ -438,30 +438,30 @@ class SAMLConfiguration(ConfigurationModel):
|
||||
)
|
||||
public_key = models.TextField(
|
||||
help_text=(
|
||||
'Public key certificate. '
|
||||
u'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(max_length=255, default="http://saml.example.com", verbose_name="Entity ID")
|
||||
entity_id = models.CharField(max_length=255, default="http://saml.example.com", verbose_name=u"Entity ID")
|
||||
org_info_str = models.TextField(
|
||||
verbose_name="Organization Info",
|
||||
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=u"Organization Info",
|
||||
default=u'{"en-US": {"url": "http://www.example.com", "displayname": "Example Inc.", "name": "example"}}',
|
||||
help_text=u"JSON dictionary of 'url', 'displayname', and 'name' for each language",
|
||||
)
|
||||
other_config_str = models.TextField(
|
||||
default='{\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\n}',
|
||||
default=u'{\n"SECURITY_CONFIG": {"metadataCacheDuration": 604800, "signMetadata": false}\n}',
|
||||
help_text=(
|
||||
"JSON object defining advanced settings that are passed on to python-saml. "
|
||||
u"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"
|
||||
),
|
||||
)
|
||||
|
||||
class Meta(object):
|
||||
app_label = "third_party_auth"
|
||||
verbose_name = "SAML Configuration"
|
||||
verbose_name = u"SAML Configuration"
|
||||
verbose_name_plural = verbose_name
|
||||
|
||||
def __str__(self):
|
||||
@@ -553,73 +553,76 @@ class SAMLProviderConfig(ProviderConfig):
|
||||
"""
|
||||
prefix = 'saml'
|
||||
backend_name = models.CharField(
|
||||
max_length=50, default='tpa-saml', blank=False,
|
||||
help_text="Which python-social-auth provider backend to use. 'tpa-saml' is the standard edX SAML backend.")
|
||||
max_length=50, default=u'tpa-saml', blank=False,
|
||||
help_text=u"Which python-social-auth provider backend to use. 'tpa-saml' is the standard edX SAML backend.")
|
||||
entity_id = models.CharField(
|
||||
max_length=255, verbose_name="Entity ID", help_text="Example: https://idp.testshib.org/idp/shibboleth")
|
||||
max_length=255, verbose_name=u"Entity ID", help_text=u"Example: https://idp.testshib.org/idp/shibboleth")
|
||||
metadata_source = models.CharField(
|
||||
max_length=255,
|
||||
help_text=(
|
||||
"URL to this provider's XML metadata. Should be an HTTPS URL. "
|
||||
u"URL to this provider's XML metadata. Should be an HTTPS URL. "
|
||||
"Example: https://www.testshib.org/metadata/testshib-providers.xml"
|
||||
))
|
||||
attr_user_permanent_id = models.CharField(
|
||||
max_length=128, blank=True, verbose_name="User ID Attribute",
|
||||
help_text="URN of the SAML attribute that we can use as a unique, persistent user ID. Leave blank for default.")
|
||||
max_length=128, blank=True, verbose_name=u"User ID Attribute",
|
||||
help_text=(
|
||||
u"URN of the SAML attribute that we can use as a unique, "
|
||||
"persistent user ID. Leave blank for default."
|
||||
))
|
||||
attr_full_name = models.CharField(
|
||||
max_length=128, blank=True, verbose_name="Full Name Attribute",
|
||||
help_text="URN of SAML attribute containing the user's full name. Leave blank for default.")
|
||||
max_length=128, blank=True, verbose_name=u"Full Name Attribute",
|
||||
help_text=u"URN of SAML attribute containing the user's full name. Leave blank for default.")
|
||||
default_full_name = models.CharField(
|
||||
max_length=255, blank=True, verbose_name="Default Value for Full Name",
|
||||
help_text="Default value for full name to be used if not present in SAML response.")
|
||||
max_length=255, blank=True, verbose_name=u"Default Value for Full Name",
|
||||
help_text=u"Default value for full name to be used if not present in SAML response.")
|
||||
attr_first_name = models.CharField(
|
||||
max_length=128, blank=True, verbose_name="First Name Attribute",
|
||||
help_text="URN of SAML attribute containing the user's first name. Leave blank for default.")
|
||||
max_length=128, blank=True, verbose_name=u"First Name Attribute",
|
||||
help_text=u"URN of SAML attribute containing the user's first name. Leave blank for default.")
|
||||
default_first_name = models.CharField(
|
||||
max_length=255, blank=True, verbose_name="Default Value for First Name",
|
||||
help_text="Default value for first name to be used if not present in SAML response.")
|
||||
max_length=255, blank=True, verbose_name=u"Default Value for First Name",
|
||||
help_text=u"Default value for first name to be used if not present in SAML response.")
|
||||
attr_last_name = models.CharField(
|
||||
max_length=128, blank=True, verbose_name="Last Name Attribute",
|
||||
help_text="URN of SAML attribute containing the user's last name. Leave blank for default.")
|
||||
max_length=128, blank=True, verbose_name=u"Last Name Attribute",
|
||||
help_text=u"URN of SAML attribute containing the user's last name. Leave blank for default.")
|
||||
default_last_name = models.CharField(
|
||||
max_length=255, blank=True, verbose_name="Default Value for Last Name",
|
||||
help_text="Default value for last name to be used if not present in SAML response.")
|
||||
max_length=255, blank=True, verbose_name=u"Default Value for Last Name",
|
||||
help_text=u"Default value for last name to be used if not present in SAML response.")
|
||||
attr_username = models.CharField(
|
||||
max_length=128, blank=True, verbose_name="Username Hint Attribute",
|
||||
help_text="URN of SAML attribute to use as a suggested username for this user. Leave blank for default.")
|
||||
max_length=128, blank=True, verbose_name=u"Username Hint Attribute",
|
||||
help_text=u"URN of SAML attribute to use as a suggested username for this user. Leave blank for default.")
|
||||
default_username = models.CharField(
|
||||
max_length=255, blank=True, verbose_name="Default Value for Username",
|
||||
help_text="Default value for username to be used if not present in SAML response.")
|
||||
max_length=255, blank=True, verbose_name=u"Default Value for Username",
|
||||
help_text=u"Default value for username to be used if not present in SAML response.")
|
||||
attr_email = models.CharField(
|
||||
max_length=128, blank=True, verbose_name="Email Attribute",
|
||||
help_text="URN of SAML attribute containing the user's email address[es]. Leave blank for default.")
|
||||
max_length=128, blank=True, verbose_name=u"Email Attribute",
|
||||
help_text=u"URN of SAML attribute containing the user's email address[es]. Leave blank for default.")
|
||||
default_email = models.CharField(
|
||||
max_length=255, blank=True, verbose_name="Default Value for Email",
|
||||
help_text="Default value for email to be used if not present in SAML response.")
|
||||
max_length=255, blank=True, verbose_name=u"Default Value for Email",
|
||||
help_text=u"Default value for email to be used if not present in SAML response.")
|
||||
automatic_refresh_enabled = models.BooleanField(
|
||||
default=True, verbose_name="Enable automatic metadata refresh",
|
||||
help_text="When checked, the SAML provider's metadata will be included "
|
||||
default=True, verbose_name=u"Enable automatic metadata refresh",
|
||||
help_text=u"When checked, the SAML provider's metadata will be included "
|
||||
"in the automatic refresh job, if configured."
|
||||
)
|
||||
identity_provider_type = models.CharField(
|
||||
max_length=128, blank=False, verbose_name="Identity Provider Type", default=STANDARD_SAML_PROVIDER_KEY,
|
||||
max_length=128, blank=False, verbose_name=u"Identity Provider Type", default=STANDARD_SAML_PROVIDER_KEY,
|
||||
choices=get_saml_idp_choices(), help_text=(
|
||||
"Some SAML providers require special behavior. For example, SAP SuccessFactors SAML providers require an "
|
||||
u"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."
|
||||
)
|
||||
)
|
||||
debug_mode = models.BooleanField(
|
||||
default=False, verbose_name="Debug Mode",
|
||||
default=False, verbose_name=u"Debug Mode",
|
||||
help_text=(
|
||||
"In debug mode, all SAML XML requests and responses will be logged. "
|
||||
u"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."
|
||||
),
|
||||
)
|
||||
other_settings = models.TextField(
|
||||
verbose_name="Advanced settings", blank=True,
|
||||
verbose_name=u"Advanced settings", blank=True,
|
||||
help_text=(
|
||||
'For advanced use cases, enter a JSON object with addtional configuration. '
|
||||
u'For advanced use cases, enter a JSON object with addtional configuration. '
|
||||
'The tpa-saml backend supports {"requiredEntitlements": ["urn:..."]}, ' # pylint: disable=unicode-format-string
|
||||
'which can be used to require the presence of a specific eduPersonEntitlement, '
|
||||
'and {"extra_field_definitions": [{"name": "...", "urn": "..."},...]}, which can be ' # pylint: disable=unicode-format-string
|
||||
@@ -644,7 +647,7 @@ class SAMLProviderConfig(ProviderConfig):
|
||||
|
||||
class Meta(object):
|
||||
app_label = "third_party_auth"
|
||||
verbose_name = "Provider Configuration (SAML IdP)"
|
||||
verbose_name = u"Provider Configuration (SAML IdP)"
|
||||
verbose_name_plural = "Provider Configuration (SAML IdPs)"
|
||||
|
||||
def get_url_params(self):
|
||||
@@ -739,12 +742,12 @@ class SAMLProviderData(models.Model):
|
||||
expires_at = models.DateTimeField(db_index=True, null=True)
|
||||
|
||||
entity_id = models.CharField(max_length=255, db_index=True) # This is the key for lookups in this table
|
||||
sso_url = models.URLField(verbose_name="SSO URL")
|
||||
sso_url = models.URLField(verbose_name=u"SSO URL")
|
||||
public_key = models.TextField()
|
||||
|
||||
class Meta(object):
|
||||
app_label = "third_party_auth"
|
||||
verbose_name = "SAML Provider Data"
|
||||
verbose_name = u"SAML Provider Data"
|
||||
verbose_name_plural = verbose_name
|
||||
ordering = ('-fetched_at', )
|
||||
|
||||
@@ -802,15 +805,15 @@ class LTIProviderConfig(ProviderConfig):
|
||||
lti_consumer_key = models.CharField(
|
||||
max_length=255,
|
||||
help_text=(
|
||||
'The name that the LTI Tool Consumer will use to identify itself'
|
||||
u'The name that the LTI Tool Consumer will use to identify itself'
|
||||
)
|
||||
)
|
||||
|
||||
lti_hostname = models.CharField(
|
||||
default='localhost',
|
||||
default=u'localhost',
|
||||
max_length=255,
|
||||
help_text=(
|
||||
'The domain that will be acting as the LTI consumer.'
|
||||
u'The domain that will be acting as the LTI consumer.'
|
||||
),
|
||||
db_index=True
|
||||
)
|
||||
@@ -819,7 +822,7 @@ class LTIProviderConfig(ProviderConfig):
|
||||
default=long_token,
|
||||
max_length=255,
|
||||
help_text=(
|
||||
'The shared secret that the LTI Tool Consumer will use to '
|
||||
u'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 '
|
||||
@@ -833,7 +836,7 @@ class LTIProviderConfig(ProviderConfig):
|
||||
lti_max_timestamp_age = models.IntegerField(
|
||||
default=10,
|
||||
help_text=(
|
||||
'The maximum age of oauth_timestamp values, in seconds.'
|
||||
u'The maximum age of oauth_timestamp values, in seconds.'
|
||||
)
|
||||
)
|
||||
|
||||
@@ -866,7 +869,7 @@ class LTIProviderConfig(ProviderConfig):
|
||||
|
||||
class Meta(object):
|
||||
app_label = "third_party_auth"
|
||||
verbose_name = "Provider Configuration (LTI)"
|
||||
verbose_name = u"Provider Configuration (LTI)"
|
||||
verbose_name_plural = verbose_name
|
||||
|
||||
|
||||
@@ -882,11 +885,11 @@ class ProviderApiPermissions(models.Model):
|
||||
provider_id = models.CharField(
|
||||
max_length=255,
|
||||
help_text=(
|
||||
'Uniquely identify a provider. This is different from backend_name.'
|
||||
u'Uniquely identify a provider. This is different from backend_name.'
|
||||
)
|
||||
)
|
||||
|
||||
class Meta(object):
|
||||
app_label = "third_party_auth"
|
||||
verbose_name = "Provider API Permission"
|
||||
verbose_name = u"Provider API Permission"
|
||||
verbose_name_plural = verbose_name + 's'
|
||||
|
||||
@@ -19,8 +19,8 @@ from social_core.exceptions import AuthForbidden
|
||||
from openedx.core.djangoapps.theming.helpers import get_current_request
|
||||
from third_party_auth.exceptions import IncorrectConfigurationException
|
||||
|
||||
STANDARD_SAML_PROVIDER_KEY = 'standard_saml_provider'
|
||||
SAP_SUCCESSFACTORS_SAML_KEY = 'sap_success_factors'
|
||||
STANDARD_SAML_PROVIDER_KEY = u'standard_saml_provider'
|
||||
SAP_SUCCESSFACTORS_SAML_KEY = u'sap_success_factors'
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ PageObjects related to the AcidBlock
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import six
|
||||
from bok_choy.page_object import PageObject
|
||||
from bok_choy.promise import BrokenPromise, EmptyPromise
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class Migration(migrations.Migration):
|
||||
('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
|
||||
('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
|
||||
('checkout_on_ecommerce_service', models.BooleanField(default=False, help_text='Use the checkout page hosted by the E-Commerce service.')),
|
||||
('single_course_checkout_page', models.CharField(default=b'/basket/single-item/', help_text='Path to single course checkout page hosted by the E-Commerce service.', max_length=255)),
|
||||
('single_course_checkout_page', models.CharField(default=u'/basket/single-item/', help_text='Path to single course checkout page hosted by the E-Commerce service.', max_length=255)),
|
||||
('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={
|
||||
|
||||
@@ -19,6 +19,6 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='commerceconfiguration',
|
||||
name='receipt_page',
|
||||
field=models.CharField(default=b'/commerce/checkout/receipt/?orderNum=', help_text='Path to order receipt page.', max_length=255),
|
||||
field=models.CharField(default=u'/commerce/checkout/receipt/?orderNum=', help_text='Path to order receipt page.', max_length=255),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -14,6 +14,6 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='commerceconfiguration',
|
||||
name='receipt_page',
|
||||
field=models.CharField(default=b'/checkout/receipt/?order_number=', help_text='Path to order receipt page.', max_length=255),
|
||||
field=models.CharField(default=u'/checkout/receipt/?order_number=', help_text='Path to order receipt page.', max_length=255),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -18,6 +18,6 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='commerceconfiguration',
|
||||
name='basket_checkout_page',
|
||||
field=models.CharField(default=b'/basket/add/', help_text='Path to course(s) checkout page hosted by the E-Commerce service.', max_length=255),
|
||||
field=models.CharField(default=u'/basket/add/', help_text='Path to course(s) checkout page hosted by the E-Commerce service.', max_length=255),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -32,7 +32,7 @@ class CommerceConfiguration(ConfigurationModel):
|
||||
|
||||
basket_checkout_page = models.CharField(
|
||||
max_length=255,
|
||||
default='/basket/add/',
|
||||
default=u'/basket/add/',
|
||||
help_text=_('Path to course(s) checkout page hosted by the E-Commerce service.')
|
||||
)
|
||||
cache_ttl = models.PositiveIntegerField(
|
||||
|
||||
@@ -75,7 +75,7 @@ class Migration(migrations.Migration):
|
||||
name='SoftwareSecurePhotoVerification',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('status', model_utils.fields.StatusField(default=b'created', max_length=100, verbose_name='status', no_check_for_status=True, choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')])),
|
||||
('status', model_utils.fields.StatusField(default=u'created', max_length=100, verbose_name='status', no_check_for_status=True, choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')])),
|
||||
('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, verbose_name='status changed', monitor='status')),
|
||||
('name', models.CharField(max_length=255, blank=True)),
|
||||
('face_image_url', models.URLField(max_length=255, blank=True)),
|
||||
@@ -124,7 +124,7 @@ class Migration(migrations.Migration):
|
||||
name='VerificationStatus',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('status', models.CharField(db_index=True, max_length=32, choices=[(b'submitted', b'submitted'), (b'approved', b'approved'), (b'denied', b'denied'), (b'error', b'error')])),
|
||||
('status', models.CharField(db_index=True, max_length=32, choices=[(u'submitted', u'submitted'), (u'approved', u'approved'), (u'denied', u'denied'), (u'error', u'error')])),
|
||||
('timestamp', models.DateTimeField(auto_now_add=True)),
|
||||
('response', models.TextField(null=True, blank=True)),
|
||||
('error', models.TextField(null=True, blank=True)),
|
||||
|
||||
@@ -21,13 +21,13 @@ class Migration(migrations.Migration):
|
||||
name='SSOVerification',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('status', model_utils.fields.StatusField(choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')], default=b'created', max_length=100, no_check_for_status=True, verbose_name='status')),
|
||||
('status', model_utils.fields.StatusField(choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')], default=u'created', max_length=100, no_check_for_status=True, verbose_name='status')),
|
||||
('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, monitor='status', verbose_name='status changed')),
|
||||
('name', models.CharField(blank=True, max_length=255)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True, db_index=True)),
|
||||
('identity_provider_type', models.CharField(choices=[(b'third_party_auth.models.OAuth2ProviderConfig', b'OAuth2 Provider'), (b'third_party_auth.models.SAMLProviderConfig', b'SAML Provider'), (b'third_party_auth.models.LTIProviderConfig', b'LTI Provider')], default=b'third_party_auth.models.SAMLProviderConfig', help_text=b'Specifies which type of Identity Provider this verification originated from.', max_length=100)),
|
||||
('identity_provider_slug', models.SlugField(default=b'default', help_text=b'The slug uniquely identifying the Identity Provider this verification originated from.', max_length=30)),
|
||||
('identity_provider_type', models.CharField(choices=[(u'third_party_auth.models.OAuth2ProviderConfig', u'OAuth2 Provider'), (u'third_party_auth.models.SAMLProviderConfig', u'SAML Provider'), (u'third_party_auth.models.LTIProviderConfig', u'LTI Provider')], default=u'third_party_auth.models.SAMLProviderConfig', help_text=u'Specifies which type of Identity Provider this verification originated from.', max_length=100)),
|
||||
('identity_provider_slug', models.SlugField(default=u'default', help_text=u'The slug uniquely identifying the Identity Provider this verification originated from.', max_length=30)),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -22,7 +22,7 @@ class Migration(migrations.Migration):
|
||||
name='IDVerificationAggregate',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('status', model_utils.fields.StatusField(choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')], default=b'created', max_length=100, no_check_for_status=True, verbose_name='status')),
|
||||
('status', model_utils.fields.StatusField(choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')], default=u'created', max_length=100, no_check_for_status=True, verbose_name='status')),
|
||||
('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, monitor='status', verbose_name='status changed')),
|
||||
('name', models.CharField(blank=True, max_length=255)),
|
||||
('object_id', models.PositiveIntegerField()),
|
||||
|
||||
@@ -21,12 +21,12 @@ class Migration(migrations.Migration):
|
||||
name='ManualVerification',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('status', model_utils.fields.StatusField(choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')], default=b'created', max_length=100, no_check_for_status=True, verbose_name='status')),
|
||||
('status', model_utils.fields.StatusField(choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')], default=u'created', max_length=100, no_check_for_status=True, verbose_name='status')),
|
||||
('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, monitor='status', verbose_name='status changed')),
|
||||
('name', models.CharField(blank=True, max_length=255)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True, db_index=True)),
|
||||
('reason', models.CharField(blank=True, help_text=b'Specifies the reason for manual verification of the user.', max_length=255)),
|
||||
('reason', models.CharField(blank=True, help_text=u'Specifies the reason for manual verification of the user.', max_length=255)),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -101,7 +101,7 @@ class IDVerificationAttempt(StatusModel):
|
||||
.. pii_types: name
|
||||
.. pii_retirement: retained
|
||||
"""
|
||||
STATUS = Choices('created', 'ready', 'submitted', 'must_retry', 'approved', 'denied')
|
||||
STATUS = Choices(u'created', u'ready', u'submitted', u'must_retry', u'approved', u'denied')
|
||||
user = models.ForeignKey(User, db_index=True, on_delete=models.CASCADE)
|
||||
|
||||
# They can change their name later on, so we want to copy the value here so
|
||||
@@ -160,7 +160,7 @@ class ManualVerification(IDVerificationAttempt):
|
||||
max_length=255,
|
||||
blank=True,
|
||||
help_text=(
|
||||
'Specifies the reason for manual verification of the user.'
|
||||
u'Specifies the reason for manual verification of the user.'
|
||||
)
|
||||
)
|
||||
|
||||
@@ -190,13 +190,13 @@ class SSOVerification(IDVerificationAttempt):
|
||||
.. no_pii:
|
||||
"""
|
||||
|
||||
OAUTH2 = 'third_party_auth.models.OAuth2ProviderConfig'
|
||||
SAML = 'third_party_auth.models.SAMLProviderConfig'
|
||||
LTI = 'third_party_auth.models.LTIProviderConfig'
|
||||
OAUTH2 = u'third_party_auth.models.OAuth2ProviderConfig'
|
||||
SAML = u'third_party_auth.models.SAMLProviderConfig'
|
||||
LTI = u'third_party_auth.models.LTIProviderConfig'
|
||||
IDENTITY_PROVIDER_TYPE_CHOICES = (
|
||||
(OAUTH2, 'OAuth2 Provider'),
|
||||
(SAML, 'SAML Provider'),
|
||||
(LTI, 'LTI Provider'),
|
||||
(OAUTH2, u'OAuth2 Provider'),
|
||||
(SAML, u'SAML Provider'),
|
||||
(LTI, u'LTI Provider'),
|
||||
)
|
||||
|
||||
identity_provider_type = models.CharField(
|
||||
@@ -205,14 +205,14 @@ class SSOVerification(IDVerificationAttempt):
|
||||
choices=IDENTITY_PROVIDER_TYPE_CHOICES,
|
||||
default=SAML,
|
||||
help_text=(
|
||||
'Specifies which type of Identity Provider this verification originated from.'
|
||||
u'Specifies which type of Identity Provider this verification originated from.'
|
||||
)
|
||||
)
|
||||
|
||||
identity_provider_slug = models.SlugField(
|
||||
max_length=30, db_index=True, default='default',
|
||||
max_length=30, db_index=True, default=u'default',
|
||||
help_text=(
|
||||
'The slug uniquely identifying the Identity Provider this verification originated from.'
|
||||
u'The slug uniquely identifying the Identity Provider this verification originated from.'
|
||||
))
|
||||
|
||||
class Meta(object):
|
||||
|
||||
@@ -14,6 +14,6 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='verifiedtrackcohortedcourse',
|
||||
name='verified_cohort_name',
|
||||
field=models.CharField(default=b'Verified Learners', max_length=100),
|
||||
field=models.CharField(default=u'Verified Learners', max_length=100),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -21,9 +21,9 @@ class Migration(migrations.Migration):
|
||||
('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')),
|
||||
('old_course_key', CourseKeyField(help_text=b'Course key for which to migrate verified track cohorts from', max_length=255)),
|
||||
('rerun_course_key', CourseKeyField(help_text=b'Course key for which to migrate verified track cohorts to enrollment tracks to', max_length=255)),
|
||||
('audit_cohort_names', models.TextField(help_text=b'Comma-separated list of audit cohort names')),
|
||||
('old_course_key', CourseKeyField(help_text=u'Course key for which to migrate verified track cohorts from', max_length=255)),
|
||||
('rerun_course_key', CourseKeyField(help_text=u'Course key for which to migrate verified track cohorts to enrollment tracks to', max_length=255)),
|
||||
('audit_cohort_names', models.TextField(help_text=u'Comma-separated list of audit cohort names')),
|
||||
('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -28,7 +28,7 @@ from student.models import CourseEnrollment
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_VERIFIED_COHORT_NAME = "Verified Learners"
|
||||
DEFAULT_VERIFIED_COHORT_NAME = u"Verified Learners"
|
||||
|
||||
|
||||
@receiver(post_save, sender=CourseEnrollment)
|
||||
@@ -170,15 +170,15 @@ class MigrateVerifiedTrackCohortsSetting(ConfigurationModel):
|
||||
old_course_key = CourseKeyField(
|
||||
max_length=255,
|
||||
blank=False,
|
||||
help_text="Course key for which to migrate verified track cohorts from"
|
||||
help_text=u"Course key for which to migrate verified track cohorts from"
|
||||
)
|
||||
rerun_course_key = CourseKeyField(
|
||||
max_length=255,
|
||||
blank=False,
|
||||
help_text="Course key for which to migrate verified track cohorts to enrollment tracks to"
|
||||
help_text=u"Course key for which to migrate verified track cohorts to enrollment tracks to"
|
||||
)
|
||||
audit_cohort_names = models.TextField(
|
||||
help_text="Comma-separated list of audit cohort names"
|
||||
help_text=u"Comma-separated list of audit cohort names"
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -20,10 +20,10 @@ class Migration(migrations.Migration):
|
||||
('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')),
|
||||
('force_update', models.BooleanField(default=False, help_text=b'Flag to force migrate transcripts for the requested courses, overwrite if already present.')),
|
||||
('commit', models.BooleanField(default=False, help_text=b'Dry-run or commit.')),
|
||||
('all_courses', models.BooleanField(default=False, help_text=b'Process all courses.')),
|
||||
('course_ids', models.TextField(help_text=b'Whitespace-separated list of course keys for which to migrate transcripts.')),
|
||||
('force_update', models.BooleanField(default=False, help_text=u'Flag to force migrate transcripts for the requested courses, overwrite if already present.')),
|
||||
('commit', models.BooleanField(default=False, help_text=u'Dry-run or commit.')),
|
||||
('all_courses', models.BooleanField(default=False, help_text=u'Process all courses.')),
|
||||
('course_ids', models.TextField(help_text=u'Whitespace-separated list of course keys for which to migrate transcripts.')),
|
||||
('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={
|
||||
|
||||
@@ -38,9 +38,9 @@ class Migration(migrations.Migration):
|
||||
('command_run', models.PositiveIntegerField(default=0)),
|
||||
('batch_size', models.PositiveIntegerField(default=0)),
|
||||
('videos_per_task', models.PositiveIntegerField(default=0)),
|
||||
('commit', models.BooleanField(default=False, help_text=b'Dry-run or commit.')),
|
||||
('all_course_videos', models.BooleanField(default=False, help_text=b'Process all videos.')),
|
||||
('course_ids', models.TextField(blank=True, help_text=b'Whitespace-separated list of course ids for which to update videos.')),
|
||||
('commit', models.BooleanField(default=False, help_text=u'Dry-run or commit.')),
|
||||
('all_course_videos', models.BooleanField(default=False, help_text=u'Process all videos.')),
|
||||
('course_ids', models.TextField(blank=True, help_text=u'Whitespace-separated list of course ids for which to update videos.')),
|
||||
('changed_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Changed by')),
|
||||
],
|
||||
options={
|
||||
|
||||
@@ -206,21 +206,21 @@ class TranscriptMigrationSetting(ConfigurationModel):
|
||||
)
|
||||
force_update = BooleanField(
|
||||
default=False,
|
||||
help_text="Flag to force migrate transcripts for the requested courses, overwrite if already present."
|
||||
help_text=u"Flag to force migrate transcripts for the requested courses, overwrite if already present."
|
||||
)
|
||||
command_run = PositiveIntegerField(default=0)
|
||||
batch_size = PositiveIntegerField(default=0)
|
||||
commit = BooleanField(
|
||||
default=False,
|
||||
help_text="Dry-run or commit."
|
||||
help_text=u"Dry-run or commit."
|
||||
)
|
||||
all_courses = BooleanField(
|
||||
default=False,
|
||||
help_text="Process all courses."
|
||||
help_text=u"Process all courses."
|
||||
)
|
||||
course_ids = TextField(
|
||||
blank=False,
|
||||
help_text="Whitespace-separated list of course keys for which to migrate transcripts."
|
||||
help_text=u"Whitespace-separated list of course keys for which to migrate transcripts."
|
||||
)
|
||||
|
||||
def increment_run(self):
|
||||
@@ -261,15 +261,15 @@ class VideoThumbnailSetting(ConfigurationModel):
|
||||
videos_per_task = PositiveIntegerField(default=0)
|
||||
commit = BooleanField(
|
||||
default=False,
|
||||
help_text="Dry-run or commit."
|
||||
help_text=u"Dry-run or commit."
|
||||
)
|
||||
all_course_videos = BooleanField(
|
||||
default=False,
|
||||
help_text="Process all videos."
|
||||
help_text=u"Process all videos."
|
||||
)
|
||||
course_ids = TextField(
|
||||
blank=True,
|
||||
help_text="Whitespace-separated list of course ids for which to update videos."
|
||||
help_text=u"Whitespace-separated list of course ids for which to update videos."
|
||||
)
|
||||
|
||||
def increment_run(self):
|
||||
|
||||
Reference in New Issue
Block a user