Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
edx-platform
Commits
c8de6821
Commit
c8de6821
authored
Oct 19, 2017
by
John Eskew
Committed by
Dillon Dumesnil
Oct 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move third_party_auth settings code to ready method.
parent
2caca025
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
15 deletions
+25
-15
common/djangoapps/third_party_auth/__init__.py
+3
-0
common/djangoapps/third_party_auth/apps.py
+22
-0
lms/startup.py
+0
-15
No files found.
common/djangoapps/third_party_auth/__init__.py
View file @
c8de6821
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
from
openedx.core.djangoapps.site_configuration
import
helpers
as
configuration_helpers
from
openedx.core.djangoapps.site_configuration
import
helpers
as
configuration_helpers
default_app_config
=
'third_party_auth.apps.ThirdPartyAuthConfig'
def
is_enabled
():
def
is_enabled
():
"""Check whether third party authentication has been enabled. """
"""Check whether third party authentication has been enabled. """
...
...
common/djangoapps/third_party_auth/apps.py
0 → 100644
View file @
c8de6821
from
django.apps
import
AppConfig
from
django.conf
import
settings
class
ThirdPartyAuthConfig
(
AppConfig
):
name
=
'third_party_auth'
verbose_name
=
"Third-party authentication"
def
ready
(
self
):
# To override the settings before loading social_django.
if
settings
.
FEATURES
.
get
(
'ENABLE_THIRD_PARTY_AUTH'
,
False
):
self
.
_enable_third_party_auth
()
def
_enable_third_party_auth
(
self
):
"""
Enable the use of third_party_auth, which allows users to sign in to edX
using other identity providers. For configuration details, see
common/djangoapps/third_party_auth/settings.py.
"""
from
third_party_auth
import
settings
as
auth_settings
auth_settings
.
apply_settings
(
settings
)
lms/startup.py
View file @
c8de6821
...
@@ -35,10 +35,6 @@ def run():
...
@@ -35,10 +35,6 @@ def run():
"""
"""
django_db_models_options
.
patch
()
django_db_models_options
.
patch
()
# To override the settings before executing the autostartup() for python-social-auth
if
settings
.
FEATURES
.
get
(
'ENABLE_THIRD_PARTY_AUTH'
,
False
):
enable_third_party_auth
()
# Comprehensive theming needs to be set up before django startup,
# Comprehensive theming needs to be set up before django startup,
# because modifying django template paths after startup has no effect.
# because modifying django template paths after startup has no effect.
if
is_comprehensive_theming_enabled
():
if
is_comprehensive_theming_enabled
():
...
@@ -114,14 +110,3 @@ def enable_microsites():
...
@@ -114,14 +110,3 @@ def enable_microsites():
Here for backwards compatibility
Here for backwards compatibility
"""
"""
microsite
.
enable_microsites
(
log
)
microsite
.
enable_microsites
(
log
)
def
enable_third_party_auth
():
"""
Enable the use of third_party_auth, which allows users to sign in to edX
using other identity providers. For configuration details, see
common/djangoapps/third_party_auth/settings.py.
"""
from
third_party_auth
import
settings
as
auth_settings
auth_settings
.
apply_settings
(
settings
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment