mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-10-16 02:21:03 +00:00
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:
@@ -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?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user