From 94c7b096b178e6009ce692220fa0bf222965a24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Boros?= Date: Fri, 25 Sep 2020 16:08:07 +0200 Subject: [PATCH] Revert "Replace all .(lms|cms).(\w+|_)?\.json to .(lms|cms).(\w+|_)?\.yml (#262)" This reverts commit 7b6447799447fded45cb5c1926feb1c6de40dd7b. --- .../migrations/0004_auto_20200919_0955.py | 34 ------------------- common/djangoapps/third_party_auth/models.py | 8 ++--- docs/guides/frontend/static_assets.rst | 4 +-- lms/djangoapps/branding/api.py | 2 +- lms/envs/common.py | 2 +- themes/README.rst | 4 +-- 6 files changed, 10 insertions(+), 44 deletions(-) delete mode 100644 common/djangoapps/third_party_auth/migrations/0004_auto_20200919_0955.py diff --git a/common/djangoapps/third_party_auth/migrations/0004_auto_20200919_0955.py b/common/djangoapps/third_party_auth/migrations/0004_auto_20200919_0955.py deleted file mode 100644 index a397de017707..000000000000 --- a/common/djangoapps/third_party_auth/migrations/0004_auto_20200919_0955.py +++ /dev/null @@ -1,34 +0,0 @@ -# Generated by Django 2.2.16 on 2020-09-19 09:55 - -from django.db import migrations, models -import openedx.core.lib.hash_utils - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0003_samlconfiguration_is_public'), - ] - - 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.yml)', max_length=255), - ), - migrations.AlterField( - model_name='oauth2providerconfig', - name='secret', - field=models.TextField(blank=True, help_text='For increased security, you can avoid storing this in your database by leaving this field blank and setting SOCIAL_AUTH_OAUTH_SECRETS = {"(backend name)": "secret", ...} in your instance\'s Django settings (or lms.yml)', verbose_name='Client Secret'), - ), - migrations.AlterField( - model_name='samlconfiguration', - name='private_key', - field=models.TextField(blank=True, help_text='To generate a key pair as two files, run "openssl req -new -x509 -days 3652 -nodes -out saml.crt -keyout saml.key". Paste the contents of saml.key here. For increased security, you can avoid storing this in your database by leaving this field blank and setting it via the SOCIAL_AUTH_SAML_SP_PRIVATE_KEY setting in your instance\'s Django settings (or lms.yml).'), - ), - migrations.AlterField( - model_name='samlconfiguration', - name='public_key', - field=models.TextField(blank=True, help_text="Public key certificate. For increased security, you can avoid storing this in your database by leaving this field blank and setting it via the SOCIAL_AUTH_SAML_SP_PUBLIC_CERT setting in your instance's Django settings (or lms.yml)."), - ), - ] diff --git a/common/djangoapps/third_party_auth/models.py b/common/djangoapps/third_party_auth/models.py index 3add4ae521f6..8edc0d9d2d76 100644 --- a/common/djangoapps/third_party_auth/models.py +++ b/common/djangoapps/third_party_auth/models.py @@ -367,7 +367,7 @@ class OAuth2ProviderConfig(ProviderConfig): 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.yml)' + 'in your instance\'s Django settings (or lms.auth.json)' ) ) other_settings = models.TextField(blank=True, help_text=u"Optional JSON object with advanced settings, if any.") @@ -431,7 +431,7 @@ class SAMLConfiguration(ConfigurationModel): '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.yml).' + 'in your instance\'s Django settings (or lms.auth.json).' ), blank=True, ) @@ -440,7 +440,7 @@ class SAMLConfiguration(ConfigurationModel): 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.yml).' + 'in your instance\'s Django settings (or lms.auth.json).' ), blank=True, ) @@ -834,7 +834,7 @@ class LTIProviderConfig(ProviderConfig): '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.yml)' + 'in your instance\'s Django setttigs (or lms.auth.json)' ), blank=True, ) diff --git a/docs/guides/frontend/static_assets.rst b/docs/guides/frontend/static_assets.rst index 89e7a64f4455..621d6311cec3 100644 --- a/docs/guides/frontend/static_assets.rst +++ b/docs/guides/frontend/static_assets.rst @@ -74,8 +74,8 @@ mechanism: ``openedx.core.djangoapps.theming.finders.ThemeFilesFinder`` Custom finder that overrides any static asset with a version from the themes - directory (``COMPREHENSIVE_THEME_DIRS`` defined in ``lms.yml`` and - ``studio.yml``). + directory (``COMPREHENSIVE_THEME_DIRS`` defined in ``lms.envs.json`` and + ``cms.envs.json``). ``openedx.core.lib.xblock_pipeline.finder.XBlockPipelineFinder`` Custom finder that accesses and extracts assets from pip-installed XBlocks via diff --git a/lms/djangoapps/branding/api.py b/lms/djangoapps/branding/api.py index afe700326ee9..651a868a237c 100644 --- a/lms/djangoapps/branding/api.py +++ b/lms/djangoapps/branding/api.py @@ -454,7 +454,7 @@ def _footer_logo_img(is_secure): logo_name = configuration_helpers.get_value('FOOTER_ORGANIZATION_IMAGE', settings.FOOTER_ORGANIZATION_IMAGE) # `logo_name` is looked up from the configuration, # which falls back on the Django settings, which loads it from - # `lms.yml`, which is created and managed by Ansible. Because of + # `lms.env.json`, which is created and managed by Ansible. Because of # this runaround, we lose a lot of the flexibility that Django's # staticfiles system provides, and we end up having to hardcode the path # to the footer logo rather than use the comprehensive theming system. diff --git a/lms/envs/common.py b/lms/envs/common.py index d149ea29dbd0..581e997b835d 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -3541,7 +3541,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring # IE: custom_form_app.forms.RegistrationExtensionForm # Note: If you want to use a model to store the results of the form, you will # need to add the model's app to the ADDL_INSTALLED_APPS array in your -# lms.yml file. +# lms.env.json file. REGISTRATION_EXTENSION_FORM = None diff --git a/themes/README.rst b/themes/README.rst index ad09d932ea65..a91f1f38f524 100644 --- a/themes/README.rst +++ b/themes/README.rst @@ -103,7 +103,7 @@ directory. There are two ways to do this. $ sudo /edx/bin/update configuration master $ sudo /edx/bin/update edx-platform HEAD -#. Otherwise, edit the /edx/app/edxapp/lms.yml file to add the +#. Otherwise, edit the /edx/app/edxapp/lms.env.json file to add the ``COMPREHENSIVE_THEME_DIRS`` value:: "COMPREHENSIVE_THEME_DIRS": ["/full/path/to/my-theme"], @@ -180,7 +180,7 @@ In addition, there are some other changes you'll need to make: config value in your site configuration. * You can set the google site verification ID in the GOOGLE_SITE_VERIFICATION_ID - in your site configuration. Otherwise, edit the /edx/app/edxapp/lms.yml + in your site configuration. Otherwise, edit the /edx/app/edxapp/lms.env.json file to set the value for GOOGLE_SITE_VERIFICATION_ID. Setting the value for GOOGLE_SITE_VERIFICATION_ID will add the meta tag for google site verification in the lms/templates/main.html which is the main Mako template that all page