feat: Add allow everyone option to GitHub OAuth2 logins (#5086)

* feat: Add allow everyone option for GitHub OAuth

* fix: Detect team when multiple orgs are present

Co-authored-by: 李董睿煊 <dongruixuan@hotmail.com>
This commit is contained in:
Mathias Fredriksson
2022-11-15 18:56:46 +02:00
committed by GitHub
co-authored by 李董睿煊
parent f262fb4811
commit 9fb710a04f
8 changed files with 187 additions and 33 deletions
+5
View File
@@ -185,6 +185,11 @@ func newConfig() *codersdk.DeploymentConfig {
Usage: "Whether new users can sign up with GitHub.",
Flag: "oauth2-github-allow-signups",
},
AllowEveryone: &codersdk.DeploymentConfigField[bool]{
Name: "OAuth2 GitHub Allow Everyone",
Usage: "Allow all logins, setting this option means allowed orgs and teams must be empty.",
Flag: "oauth2-github-allow-everyone",
},
EnterpriseBaseURL: &codersdk.DeploymentConfigField[string]{
Name: "OAuth2 GitHub Enterprise Base URL",
Usage: "Base URL of a GitHub Enterprise deployment to use for Login with GitHub.",