22
33import os
44import re
5- import subprocess
65import socket
6+ import subprocess
77
88import structlog
9-
109from celery .schedules import crontab
10+ from corsheaders .defaults import default_headers
11+ from django .conf .global_settings import PASSWORD_HASHERS
1112
13+ from readthedocs .builds import constants_docker
1214from readthedocs .core .logs import shared_processors
13- from corsheaders .defaults import default_headers
1415from readthedocs .core .settings import Settings
15- from readthedocs .builds import constants_docker
16-
17- from django .conf .global_settings import PASSWORD_HASHERS
1816
1917try :
2018 import readthedocsext .cdn # noqa
3634
3735
3836class CommunityBaseSettings (Settings ):
39-
4037 """Community base settings, don't use this directly."""
4138
4239 # Django settings
@@ -76,7 +73,7 @@ def _show_debug_toolbar(request):
7673 # It's a "known issue/bug" and there is no solution as far as we can tell.
7774 "debug_toolbar.panels.sql.SQLPanel" ,
7875 "debug_toolbar.panels.templates.TemplatesPanel" ,
79- ]
76+ ],
8077 }
8178
8279 @property
@@ -682,6 +679,7 @@ def DOCKER_LIMITS(self):
682679
683680 # Allauth
684681 ACCOUNT_ADAPTER = "readthedocs.core.adapters.AccountAdapter"
682+ SOCIALACCOUNT_ADAPTER = 'readthedocs.core.adapters.SocialAccountAdapter'
685683 ACCOUNT_EMAIL_REQUIRED = True
686684 # By preventing enumeration, we will always send an email,
687685 # even if the email is not registered, that's hurting
@@ -704,7 +702,6 @@ def DOCKER_LIMITS(self):
704702 "APPS" : [
705703 {"client_id" : "123" , "secret" : "456" , "key" : "" },
706704 ],
707- "VERIFIED_EMAIL" : True ,
708705 "SCOPE" : [
709706 "user:email" ,
710707 "read:org" ,
@@ -716,6 +713,7 @@ def DOCKER_LIMITS(self):
716713 "APPS" : [
717714 {"client_id" : "123" , "secret" : "456" , "key" : "" },
718715 ],
716+ # GitLab returns the primary email only, we can trust it's verified.
719717 "VERIFIED_EMAIL" : True ,
720718 "SCOPE" : [
721719 "api" ,
0 commit comments