zendesk proxy plugin
This commit is contained in:
@@ -445,9 +445,6 @@ EVENT_TRACKING_BACKENDS['segmentio']['OPTIONS']['processors'][0]['OPTIONS']['whi
|
||||
|
||||
VIRTUAL_UNIVERSITIES = ENV_TOKENS.get('VIRTUAL_UNIVERSITIES', [])
|
||||
|
||||
# Zendesk
|
||||
ZENDESK_OAUTH_ACCESS_TOKEN = AUTH_TOKENS.get("ZENDESK_OAUTH_ACCESS_TOKEN")
|
||||
|
||||
##### ACCOUNT LOCKOUT DEFAULT PARAMETERS #####
|
||||
MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = ENV_TOKENS.get("MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED", 5)
|
||||
MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS = ENV_TOKENS.get("MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS", 15 * 60)
|
||||
|
||||
@@ -1493,7 +1493,6 @@ VIDEO_IMAGE_ASPECT_RATIO_ERROR_MARGIN = 0.1
|
||||
ZENDESK_URL = None
|
||||
ZENDESK_USER = None
|
||||
ZENDESK_API_KEY = None
|
||||
ZENDESK_OAUTH_ACCESS_TOKEN = None
|
||||
ZENDESK_CUSTOM_FIELDS = {}
|
||||
|
||||
|
||||
|
||||
@@ -157,7 +157,6 @@ urlpatterns = [
|
||||
url(r'^api/val/v0/', include('edxval.urls')),
|
||||
url(r'^api/tasks/v0/', include('user_tasks.urls')),
|
||||
url(r'^accessibility$', contentstore.views.accessibility, name='accessibility'),
|
||||
url(r'^zendesk_proxy/', include('openedx.core.djangoapps.zendesk_proxy.urls')),
|
||||
]
|
||||
|
||||
JS_INFO_DICT = {
|
||||
|
||||
@@ -598,7 +598,6 @@ MAILCHIMP_NEW_USER_LIST_ID = ENV_TOKENS.get("MAILCHIMP_NEW_USER_LIST_ID")
|
||||
# Zendesk
|
||||
ZENDESK_USER = AUTH_TOKENS.get("ZENDESK_USER")
|
||||
ZENDESK_API_KEY = AUTH_TOKENS.get("ZENDESK_API_KEY")
|
||||
ZENDESK_OAUTH_ACCESS_TOKEN = AUTH_TOKENS.get("ZENDESK_OAUTH_ACCESS_TOKEN")
|
||||
|
||||
# API Key for inbound requests from Notifier service
|
||||
EDX_API_KEY = AUTH_TOKENS.get("EDX_API_KEY")
|
||||
|
||||
@@ -1151,7 +1151,6 @@ FEEDBACK_SUBMISSION_EMAIL = None
|
||||
ZENDESK_URL = None
|
||||
ZENDESK_USER = None
|
||||
ZENDESK_API_KEY = None
|
||||
ZENDESK_OAUTH_ACCESS_TOKEN = None
|
||||
ZENDESK_CUSTOM_FIELDS = {}
|
||||
|
||||
##### EMBARGO #####
|
||||
|
||||
@@ -139,9 +139,6 @@ urlpatterns = [
|
||||
|
||||
url(r'^dashboard/', include('learner_dashboard.urls')),
|
||||
url(r'^api/experiments/', include('experiments.urls', namespace='api_experiments')),
|
||||
|
||||
# Zendesk API proxy endpoint
|
||||
url(r'^zendesk_proxy/', include('openedx.core.djangoapps.zendesk_proxy.urls')),
|
||||
]
|
||||
|
||||
# TODO: This needs to move to a separate urls.py once the student_account and
|
||||
|
||||
40
openedx/core/djangoapps/zendesk_proxy/apps.py
Normal file
40
openedx/core/djangoapps/zendesk_proxy/apps.py
Normal file
@@ -0,0 +1,40 @@
|
||||
"""
|
||||
Zendesk Proxy Configuration
|
||||
|
||||
"""
|
||||
|
||||
from django.apps import AppConfig
|
||||
|
||||
from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType, PluginURLs, PluginSettings
|
||||
|
||||
|
||||
class ZendeskProxyConfig(AppConfig):
|
||||
"""
|
||||
AppConfig for zendesk proxy app
|
||||
"""
|
||||
name = 'openedx.core.djangoapps.zendesk_proxy'
|
||||
|
||||
plugin_app = {
|
||||
PluginURLs.CONFIG: {
|
||||
ProjectType.CMS: {
|
||||
PluginURLs.NAMESPACE: u'',
|
||||
PluginURLs.REGEX: r'^zendesk_proxy/',
|
||||
PluginURLs.RELATIVE_PATH: u'urls',
|
||||
},
|
||||
ProjectType.LMS: {
|
||||
PluginURLs.NAMESPACE: u'',
|
||||
PluginURLs.REGEX: r'^zendesk_proxy/',
|
||||
PluginURLs.RELATIVE_PATH: u'urls',
|
||||
}
|
||||
},
|
||||
PluginSettings.CONFIG: {
|
||||
ProjectType.CMS: {
|
||||
SettingsType.COMMON: {PluginSettings.RELATIVE_PATH: u'settings.common'},
|
||||
SettingsType.AWS: {PluginSettings.RELATIVE_PATH: u'settings.aws'},
|
||||
},
|
||||
ProjectType.LMS: {
|
||||
SettingsType.COMMON: {PluginSettings.RELATIVE_PATH: u'settings.common'},
|
||||
SettingsType.AWS: {PluginSettings.RELATIVE_PATH: u'settings.aws'},
|
||||
}
|
||||
}
|
||||
}
|
||||
6
openedx/core/djangoapps/zendesk_proxy/settings/aws.py
Normal file
6
openedx/core/djangoapps/zendesk_proxy/settings/aws.py
Normal file
@@ -0,0 +1,6 @@
|
||||
""" Production settings for zendesk proxy."""
|
||||
|
||||
|
||||
def plugin_settings(settings):
|
||||
settings.ZENDESK_URL = settings.ENV_TOKENS.get('ZENDESK_URL', settings.ZENDESK_URL)
|
||||
settings.ZENDESK_OAUTH_ACCESS_TOKEN = settings.AUTH_TOKENS.get("ZENDESK_OAUTH_ACCESS_TOKEN")
|
||||
6
openedx/core/djangoapps/zendesk_proxy/settings/common.py
Normal file
6
openedx/core/djangoapps/zendesk_proxy/settings/common.py
Normal file
@@ -0,0 +1,6 @@
|
||||
""" Common settings for zendesk proxy."""
|
||||
|
||||
|
||||
def plugin_settings(settings):
|
||||
settings.ZENDESK_URL = None
|
||||
settings.ZENDESK_OAUTH_ACCESS_TOKEN = None
|
||||
2
setup.py
2
setup.py
@@ -71,6 +71,7 @@ setup(
|
||||
"theming = openedx.core.djangoapps.theming.apps:ThemingConfig",
|
||||
"instructor = lms.djangoapps.instructor.apps:InstructorConfig",
|
||||
"bookmarks = openedx.core.djangoapps.bookmarks.apps:BookmarksConfig",
|
||||
"zendesk_proxy = openedx.core.djangoapps.zendesk_proxy.apps:ZendeskProxyConfig",
|
||||
],
|
||||
"cms.djangoapp": [
|
||||
"ace_common = openedx.core.djangoapps.ace_common.apps:AceCommonConfig",
|
||||
@@ -78,6 +79,7 @@ setup(
|
||||
"schedules = openedx.core.djangoapps.schedules.apps:SchedulesConfig",
|
||||
"theming = openedx.core.djangoapps.theming.apps:ThemingConfig",
|
||||
"bookmarks = openedx.core.djangoapps.bookmarks.apps:BookmarksConfig",
|
||||
"zendesk_proxy = openedx.core.djangoapps.zendesk_proxy.apps:ZendeskProxyConfig",
|
||||
],
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user