mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add login type 'none' to prevent password login (#8009)
* feat: add login type 'none' to prevent login Users with this login type must use tokens to authenticate. Tokens must come from some other source, not a /login with password authentication
This commit is contained in:
@@ -224,6 +224,7 @@ export interface CreateUserRequest {
|
||||
readonly email: string
|
||||
readonly username: string
|
||||
readonly password: string
|
||||
readonly disable_login: boolean
|
||||
readonly organization_id: string
|
||||
}
|
||||
|
||||
@@ -1396,8 +1397,14 @@ export type LogSource = "provisioner" | "provisioner_daemon"
|
||||
export const LogSources: LogSource[] = ["provisioner", "provisioner_daemon"]
|
||||
|
||||
// From codersdk/apikey.go
|
||||
export type LoginType = "github" | "oidc" | "password" | "token"
|
||||
export const LoginTypes: LoginType[] = ["github", "oidc", "password", "token"]
|
||||
export type LoginType = "github" | "none" | "oidc" | "password" | "token"
|
||||
export const LoginTypes: LoginType[] = [
|
||||
"github",
|
||||
"none",
|
||||
"oidc",
|
||||
"password",
|
||||
"token",
|
||||
]
|
||||
|
||||
// From codersdk/provisionerdaemons.go
|
||||
export type ProvisionerJobStatus =
|
||||
|
||||
@@ -50,6 +50,7 @@ export const CreateUserForm: FC<
|
||||
password: "",
|
||||
username: "",
|
||||
organization_id: myOrgId,
|
||||
disable_login: false,
|
||||
},
|
||||
validationSchema,
|
||||
onSubmit,
|
||||
|
||||
Reference in New Issue
Block a user