2
2
3
3
import os
4
4
import re
5
- import subprocess
6
5
import socket
6
+ import subprocess
7
7
8
8
import structlog
9
-
10
9
from celery .schedules import crontab
10
+ from corsheaders .defaults import default_headers
11
+ from django .conf .global_settings import PASSWORD_HASHERS
11
12
13
+ from readthedocs .builds import constants_docker
12
14
from readthedocs .core .logs import shared_processors
13
- from corsheaders .defaults import default_headers
14
15
from readthedocs .core .settings import Settings
15
- from readthedocs .builds import constants_docker
16
-
17
- from django .conf .global_settings import PASSWORD_HASHERS
18
16
19
17
try :
20
18
import readthedocsext .cdn # noqa
36
34
37
35
38
36
class CommunityBaseSettings (Settings ):
39
-
40
37
"""Community base settings, don't use this directly."""
41
38
42
39
# Django settings
@@ -76,7 +73,7 @@ def _show_debug_toolbar(request):
76
73
# It's a "known issue/bug" and there is no solution as far as we can tell.
77
74
"debug_toolbar.panels.sql.SQLPanel" ,
78
75
"debug_toolbar.panels.templates.TemplatesPanel" ,
79
- ]
76
+ ],
80
77
}
81
78
82
79
@property
@@ -682,6 +679,7 @@ def DOCKER_LIMITS(self):
682
679
683
680
# Allauth
684
681
ACCOUNT_ADAPTER = "readthedocs.core.adapters.AccountAdapter"
682
+ SOCIALACCOUNT_ADAPTER = 'readthedocs.core.adapters.SocialAccountAdapter'
685
683
ACCOUNT_EMAIL_REQUIRED = True
686
684
# By preventing enumeration, we will always send an email,
687
685
# even if the email is not registered, that's hurting
@@ -704,7 +702,6 @@ def DOCKER_LIMITS(self):
704
702
"APPS" : [
705
703
{"client_id" : "123" , "secret" : "456" , "key" : "" },
706
704
],
707
- "VERIFIED_EMAIL" : True ,
708
705
"SCOPE" : [
709
706
"user:email" ,
710
707
"read:org" ,
@@ -716,6 +713,7 @@ def DOCKER_LIMITS(self):
716
713
"APPS" : [
717
714
{"client_id" : "123" , "secret" : "456" , "key" : "" },
718
715
],
716
+ # GitLab returns the primary email only, we can trust it's verified.
719
717
"VERIFIED_EMAIL" : True ,
720
718
"SCOPE" : [
721
719
"api" ,
0 commit comments