diff --git a/crates/cli/src/commands/manage.rs b/crates/cli/src/commands/manage.rs index e2df06a76..b7f9fdf2f 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 @@ -484,6 +497,9 @@ impl Options { usage_limit, unlimited, expires_in, + username, + email, + passwordless, } => { let _span = info_span!("cli.manage.add_user_registration_token").entered(); @@ -516,9 +532,9 @@ impl Options { token_str, usage_limit, expires_at, - None, - None, - false, + username, + email, + passwordless, ) .await?;