[GIT-66] improvement: prevent disabling last enabled authentication method (#8570)

This commit is contained in:
Prateek Shourya 2026-01-27 00:47:37 +05:30 committed by GitHub
parent f7d5200ed8
commit 32a2584578
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 167 additions and 127 deletions

View file

@ -34,6 +34,7 @@ export const getCoreAuthenticationModesMap: (
"Log in or sign up for Plane using codes sent via email. You need to have set up SMTP to use this method.",
icon: <Mails className="h-6 w-6 p-0.5 text-tertiary" />,
config: <EmailCodesConfiguration disabled={disabled} updateConfig={updateConfig} />,
enabledConfigKey: "ENABLE_MAGIC_LINK_LOGIN",
},
"passwords-login": {
key: "passwords-login",
@ -41,6 +42,7 @@ export const getCoreAuthenticationModesMap: (
description: "Allow members to create accounts with passwords and use it with their email addresses to sign in.",
icon: <KeyRound className="h-6 w-6 p-0.5 text-tertiary" />,
config: <PasswordLoginConfiguration disabled={disabled} updateConfig={updateConfig} />,
enabledConfigKey: "ENABLE_EMAIL_PASSWORD",
},
google: {
key: "google",
@ -48,6 +50,7 @@ export const getCoreAuthenticationModesMap: (
description: "Allow members to log in or sign up for Plane with their Google accounts.",
icon: <img src={googleLogo} height={20} width={20} alt="Google Logo" />,
config: <GoogleConfiguration disabled={disabled} updateConfig={updateConfig} />,
enabledConfigKey: "IS_GOOGLE_ENABLED",
},
github: {
key: "github",
@ -62,6 +65,7 @@ export const getCoreAuthenticationModesMap: (
/>
),
config: <GithubConfiguration disabled={disabled} updateConfig={updateConfig} />,
enabledConfigKey: "IS_GITHUB_ENABLED",
},
gitlab: {
key: "gitlab",
@ -69,6 +73,7 @@ export const getCoreAuthenticationModesMap: (
description: "Allow members to log in or sign up to plane with their GitLab accounts.",
icon: <img src={gitlabLogo} height={20} width={20} alt="GitLab Logo" />,
config: <GitlabConfiguration disabled={disabled} updateConfig={updateConfig} />,
enabledConfigKey: "IS_GITLAB_ENABLED",
},
gitea: {
key: "gitea",
@ -76,5 +81,6 @@ export const getCoreAuthenticationModesMap: (
description: "Allow members to log in or sign up to plane with their Gitea accounts.",
icon: <img src={giteaLogo} height={20} width={20} alt="Gitea Logo" />,
config: <GiteaConfiguration disabled={disabled} updateConfig={updateConfig} />,
enabledConfigKey: "IS_GITEA_ENABLED",
},
});