diff --git a/crates/cli/src/commands/manage.rs b/crates/cli/src/commands/manage.rs index 4d7ed623a..0690324b6 100644 --- a/crates/cli/src/commands/manage.rs +++ b/crates/cli/src/commands/manage.rs @@ -133,6 +133,19 @@ enum Subcommand { /// If not provided, the token never expires. #[arg(long)] expires_in: Option, + + /// Only allow registering with this username + #[arg(long)] + username: Option, + + /// Only allow registering with this email address + #[arg(long)] + email: Option, + + /// Don't require a password when registering with this token; the + /// user is identified by a code sent to their email address + #[arg(long, action = ArgAction::SetTrue)] + passwordless: bool, }, /// Trigger a provisioning job for all users @@ -482,6 +495,9 @@ impl Options { usage_limit, unlimited, expires_in, + username, + email, + passwordless, } => { let _span = info_span!("cli.manage.add_user_registration_token").entered(); @@ -514,9 +530,9 @@ impl Options { token_str, usage_limit, expires_at, - None, - None, - false, + username, + email, + passwordless, ) .await?;