Skip to content

Commit d8a52ae

Browse files
authored
Allow override SOCIALACCOUNT_PROVIDERS from ops (#11165)
* Allow override SOCIALACCOUNT_PROVIDERS from ops * Property
1 parent 7b1de53 commit d8a52ae

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

readthedocs/settings/base.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ def DOCKER_LIMITS(self):
644644
SOCIALACCOUNT_AUTO_SIGNUP = False
645645
SOCIALACCOUNT_STORE_TOKENS = True
646646

647-
SOCIALACCOUNT_PROVIDERS = {
647+
_SOCIALACCOUNT_PROVIDERS = {
648648
'github': {
649649
"APPS": [
650650
{
@@ -696,6 +696,16 @@ def DOCKER_LIMITS(self):
696696
],
697697
},
698698
}
699+
700+
@property
701+
def SOCIALACCOUNT_PROVIDERS(self):
702+
"""
703+
This is useful to override in a subclass, mainly to add the secrets when deploying.
704+
705+
Our ops repos have a complex (shared) inheritance structure, so it's easier this way.
706+
"""
707+
return self._SOCIALACCOUNT_PROVIDERS
708+
699709
ACCOUNT_FORMS = {
700710
'signup': 'readthedocs.forms.SignupFormWithNewsletter',
701711
}

0 commit comments

Comments
 (0)