Add --username, --email and --passwordless to manage issue-user-registration-token

The three token properties were only reachable through the admin API.
This commit is contained in:
Quentin Gliech
2026-10-13 14:02:34 +02:00
parent 4ac82a97f5
commit 017f6b6228
+19 -3
View File
@@ -133,6 +133,19 @@ enum Subcommand {
/// If not provided, the token never expires.
#[arg(long)]
expires_in: Option<u32>,
/// Only allow registering with this username
#[arg(long)]
username: Option<String>,
/// Only allow registering with this email address
#[arg(long)]
email: Option<String>,
/// 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?;