Merge pull request #18010 from edx/jlajoie/LEARNER-4700
LEARNER-4700: Converts credentials to plugin
This commit is contained in:
@@ -817,9 +817,6 @@ ECOMMERCE_API_TIMEOUT = ENV_TOKENS.get('ECOMMERCE_API_TIMEOUT', ECOMMERCE_API_TI
|
||||
|
||||
COURSE_CATALOG_API_URL = ENV_TOKENS.get('COURSE_CATALOG_API_URL', COURSE_CATALOG_API_URL)
|
||||
|
||||
CREDENTIALS_INTERNAL_SERVICE_URL = ENV_TOKENS.get('CREDENTIALS_INTERNAL_SERVICE_URL', CREDENTIALS_INTERNAL_SERVICE_URL)
|
||||
CREDENTIALS_PUBLIC_SERVICE_URL = ENV_TOKENS.get('CREDENTIALS_PUBLIC_SERVICE_URL', CREDENTIALS_PUBLIC_SERVICE_URL)
|
||||
|
||||
ECOMMERCE_SERVICE_WORKER_USERNAME = ENV_TOKENS.get(
|
||||
'ECOMMERCE_SERVICE_WORKER_USERNAME',
|
||||
ECOMMERCE_SERVICE_WORKER_USERNAME
|
||||
|
||||
@@ -2253,9 +2253,6 @@ INSTALLED_APPS = [
|
||||
|
||||
'sorl.thumbnail',
|
||||
|
||||
# Credentials support
|
||||
'openedx.core.djangoapps.credentials',
|
||||
|
||||
# edx-milestones service
|
||||
'milestones',
|
||||
|
||||
|
||||
@@ -217,9 +217,6 @@ if FEATURES.get('ENABLE_THIRD_PARTY_AUTH') and 'third_party_auth.dummy.DummyBack
|
||||
############## ECOMMERCE API CONFIGURATION SETTINGS ###############
|
||||
ECOMMERCE_PUBLIC_URL_ROOT = "http://localhost:8002"
|
||||
|
||||
CREDENTIALS_INTERNAL_SERVICE_URL = 'http://localhost:8008'
|
||||
CREDENTIALS_PUBLIC_SERVICE_URL = 'http://localhost:8008'
|
||||
|
||||
###################### Cross-domain requests ######################
|
||||
FEATURES['ENABLE_CORS_HEADERS'] = True
|
||||
CORS_ALLOW_CREDENTIALS = True
|
||||
|
||||
@@ -561,9 +561,6 @@ JWT_AUTH.update({
|
||||
|
||||
COURSE_CATALOG_API_URL = 'https://catalog.example.com/api/v1'
|
||||
|
||||
CREDENTIALS_INTERNAL_SERVICE_URL = 'https://credentials-internal.example.com'
|
||||
CREDENTIALS_PUBLIC_SERVICE_URL = 'https://credentials.example.com'
|
||||
|
||||
COMPREHENSIVE_THEME_DIRS = [REPO_ROOT / "themes", REPO_ROOT / "common/test"]
|
||||
COMPREHENSIVE_THEME_LOCALE_PATHS = [REPO_ROOT / "themes/conf/locale", ]
|
||||
|
||||
|
||||
25
openedx/core/djangoapps/credentials/apps.py
Normal file
25
openedx/core/djangoapps/credentials/apps.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
Credentials Configuration
|
||||
"""
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType, PluginSettings
|
||||
|
||||
|
||||
class CredentialsConfig(AppConfig):
|
||||
"""
|
||||
Configuration class for credentials Django app
|
||||
"""
|
||||
name = 'openedx.core.djangoapps.credentials'
|
||||
verbose_name = _("Credentials")
|
||||
|
||||
plugin_app = {
|
||||
PluginSettings.CONFIG: {
|
||||
ProjectType.LMS: {
|
||||
SettingsType.AWS: {PluginSettings.RELATIVE_PATH: u'settings.aws'},
|
||||
SettingsType.COMMON: {PluginSettings.RELATIVE_PATH: u'settings.common'},
|
||||
SettingsType.DEVSTACK: {PluginSettings.RELATIVE_PATH: u'settings.devstack'},
|
||||
SettingsType.TEST: {PluginSettings.RELATIVE_PATH: u'settings.test'},
|
||||
}
|
||||
}
|
||||
}
|
||||
11
openedx/core/djangoapps/credentials/settings/aws.py
Normal file
11
openedx/core/djangoapps/credentials/settings/aws.py
Normal file
@@ -0,0 +1,11 @@
|
||||
"""Production settings for Credentials"""
|
||||
|
||||
|
||||
def plugin_settings(settings):
|
||||
# Credentials Settings
|
||||
settings.CREDENTIALS_INTERNAL_SERVICE_URL = settings.ENV_TOKENS.get(
|
||||
'CREDENTIALS_INTERNAL_SERVICE_URL', settings.CREDENTIALS_INTERNAL_SERVICE_URL
|
||||
)
|
||||
settings.CREDENTIALS_PUBLIC_SERVICE_URL = settings.ENV_TOKENS.get(
|
||||
'CREDENTIALS_PUBLIC_SERVICE_URL', settings.CREDENTIALS_PUBLIC_SERVICE_URL
|
||||
)
|
||||
7
openedx/core/djangoapps/credentials/settings/common.py
Normal file
7
openedx/core/djangoapps/credentials/settings/common.py
Normal file
@@ -0,0 +1,7 @@
|
||||
"""Common settings for Credentials."""
|
||||
|
||||
|
||||
def plugin_settings(settings):
|
||||
# Credentials Settings
|
||||
settings.CREDENTIALS_INTERNAL_SERVICE_URL = 'http://localhost:8008'
|
||||
settings.CREDENTIALS_PUBLIC_SERVICE_URL = 'http://localhost:8008'
|
||||
7
openedx/core/djangoapps/credentials/settings/devstack.py
Normal file
7
openedx/core/djangoapps/credentials/settings/devstack.py
Normal file
@@ -0,0 +1,7 @@
|
||||
"""Docker devstack settings for Credentials."""
|
||||
|
||||
|
||||
def plugin_settings(settings):
|
||||
# Credentials Settings
|
||||
settings.CREDENTIALS_INTERNAL_SERVICE_URL = 'http://edx.devstack.credentials:18150'
|
||||
settings.CREDENTIALS_PUBLIC_SERVICE_URL = 'http://localhost:18150'
|
||||
7
openedx/core/djangoapps/credentials/settings/test.py
Normal file
7
openedx/core/djangoapps/credentials/settings/test.py
Normal file
@@ -0,0 +1,7 @@
|
||||
"""Test settings for Credentials."""
|
||||
|
||||
|
||||
def plugin_settings(settings):
|
||||
# Credentials Settings
|
||||
settings.CREDENTIALS_INTERNAL_SERVICE_URL = 'https://credentials-internal.example.com'
|
||||
settings.CREDENTIALS_PUBLIC_SERVICE_URL = 'https://credentials.example.com'
|
||||
1
setup.py
1
setup.py
@@ -66,6 +66,7 @@ setup(
|
||||
],
|
||||
"lms.djangoapp": [
|
||||
"ace_common = openedx.core.djangoapps.ace_common.apps:AceCommonConfig",
|
||||
"credentials = openedx.core.djangoapps.credentials.apps:CredentialsConfig",
|
||||
"discussion = lms.djangoapps.discussion.apps:DiscussionConfig",
|
||||
"grades = lms.djangoapps.grades.apps:GradesConfig",
|
||||
"plugins = openedx.core.djangoapps.plugins.apps:PluginsConfig",
|
||||
|
||||
Reference in New Issue
Block a user