Adding new settings to correct places (#23051)

These settings are used to toggle new authentication class in discussion and bookmarks app. The auth class is in openedx/core/lib/api/authentication.py and was added to replace deprecated OAuth2Authentication class in [rest_framework_oauth library](https://github.com/jpadilla/django-rest-framework-oauth)
This commit is contained in:
Manjinder Singh
2020-02-10 10:17:31 -05:00
committed by GitHub
parent cf34c2cd94
commit f08185443e
2 changed files with 11 additions and 0 deletions

View File

@@ -130,6 +130,11 @@ FEATURES = {
# Toggles OAuth2 authentication provider
'ENABLE_OAUTH2_PROVIDER': False,
# Toggles auth class in discussions djangoapps
'DISCUSSION_USE_NEW_OAUTH2_CLASS': False,
# Toggles auth class in bookmarks djangoapps
'BOOKMARKS_USE_NEW_OAUTH2_CLASS': False,
# Allows to enable an API endpoint to serve XBlock view, used for example by external applications.
# See jquey-xblock: https://github.com/edx-solutions/jquery-xblock
'ENABLE_XBLOCK_VIEW_ENDPOINT': False,

View File

@@ -768,6 +768,12 @@ if FEATURES.get('ENABLE_OAUTH2_PROVIDER'):
OAUTH_ID_TOKEN_EXPIRATION = ENV_TOKENS.get('OAUTH_ID_TOKEN_EXPIRATION', OAUTH_ID_TOKEN_EXPIRATION)
OAUTH_DELETE_EXPIRED = ENV_TOKENS.get('OAUTH_DELETE_EXPIRED', OAUTH_DELETE_EXPIRED)
##### Changing Authentication Class ####
# Toggles auth class in discussions djangoapps
DISCUSSION_USE_NEW_OAUTH2_CLASS = ENV_TOKENS.get('DISCUSSION_USE_NEW_OAUTH2_CLASS', False)
# Toggles auth class in bookmakrs djangoapps
BOOKMARKS_USE_NEW_OAUTH2_CLASS = ENV_TOKENS.get('BOOKMARKS_USE_NEW_OAUTH2_CLASS', False)
##### GOOGLE ANALYTICS IDS #####
GOOGLE_ANALYTICS_ACCOUNT = AUTH_TOKENS.get('GOOGLE_ANALYTICS_ACCOUNT')
GOOGLE_ANALYTICS_TRACKING_ID = AUTH_TOKENS.get('GOOGLE_ANALYTICS_TRACKING_ID')