mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-07-15 17:15:17 +00:00
pveum: add 'tfa delete' subcommand for deleting user-TFA
Allows a user to straight forward delete TFS over CLI, easier as telling them to edit some config files, and the API is already there. Short circuit most params of that API call to undef, as they do not make sense to expose. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
8f4a522f4f
commit
618d112b74
@ -117,6 +117,9 @@ our $cmddef = {
|
|||||||
delete => [ 'PVE::API2::User', 'delete_user', ['userid'] ],
|
delete => [ 'PVE::API2::User', 'delete_user', ['userid'] ],
|
||||||
list => [ 'PVE::API2::User', 'index', [], {}, $print_api_result, $PVE::RESTHandler::standard_output_options],
|
list => [ 'PVE::API2::User', 'index', [], {}, $print_api_result, $PVE::RESTHandler::standard_output_options],
|
||||||
permissions => [ 'PVE::API2::AccessControl', 'permissions', ['userid'], {}, $print_perm_result, $PVE::RESTHandler::standard_output_options],
|
permissions => [ 'PVE::API2::AccessControl', 'permissions', ['userid'], {}, $print_perm_result, $PVE::RESTHandler::standard_output_options],
|
||||||
|
tfa => {
|
||||||
|
delete => [ 'PVE::API2::AccessControl', 'change_tfa', ['userid'], { action => 'delete', key => undef, config => undef, response => undef, }, ],
|
||||||
|
},
|
||||||
token => {
|
token => {
|
||||||
add => [ 'PVE::API2::User', 'generate_token', ['userid', 'tokenid'], {}, $print_api_result, $PVE::RESTHandler::standard_output_options ],
|
add => [ 'PVE::API2::User', 'generate_token', ['userid', 'tokenid'], {}, $print_api_result, $PVE::RESTHandler::standard_output_options ],
|
||||||
modify => [ 'PVE::API2::User', 'update_token_info', ['userid', 'tokenid'], {}, $print_api_result, $PVE::RESTHandler::standard_output_options ],
|
modify => [ 'PVE::API2::User', 'update_token_info', ['userid', 'tokenid'], {}, $print_api_result, $PVE::RESTHandler::standard_output_options ],
|
||||||
|
Loading…
Reference in New Issue
Block a user