api: add missing token list match_all property

to have the proper link between the token list and the sub routes
in the api, include the 'tokenname' property in the token listing

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dominik Csapak
2021-09-21 12:11:15 +02:00
committed by Thomas Lamprecht
parent efb7c5348c
commit f54634a890
2 changed files with 47 additions and 25 deletions

View File

@ -198,15 +198,15 @@ pub fn user_commands() -> CommandLineInterface {
.insert(
"generate-token",
CliCommand::new(&api2::access::user::API_METHOD_GENERATE_TOKEN)
.arg_param(&["userid", "tokenname"])
.arg_param(&["userid", "token-name"])
.completion_cb("userid", pbs_config::user::complete_userid)
)
.insert(
"delete-token",
CliCommand::new(&api2::access::user::API_METHOD_DELETE_TOKEN)
.arg_param(&["userid", "tokenname"])
.arg_param(&["userid", "token-name"])
.completion_cb("userid", pbs_config::user::complete_userid)
.completion_cb("tokenname", pbs_config::user::complete_token_name)
.completion_cb("token-name", pbs_config::user::complete_token_name)
)
.insert(
"permissions",