Compare commits

..

No commits in common. "3e16297d0c96e48d74308efded1bd77d651af0b0" and "f8ac920fd97972e77625c58766cc948d6da65375" have entirely different histories.

4 changed files with 1 additions and 36 deletions

View file

@ -95,12 +95,6 @@ nb-domains login domain1 domain2 domain3...
See
.Pa migration.mk
for more information.
.It Li delete-user-data
Purge all the data related to an user.
.br
Usage:
.Ar admin delete-user-data uid [uid...]
.El
For

View file

@ -186,13 +186,6 @@ class DNSManager::Client < IPC
send_now request
end
def admin_delete_user_data(user : UInt32)
request = Request::DeleteUser.new user
send_now request
parse_message [ Response::Success ], read
end
#
# Utils
#

View file

@ -34,8 +34,6 @@ class Actions
@the_call["admin-provide-domain"] = ->admin_provide_domain
@the_call["admin-exit"] = ->admin_exit
@the_call["admin-delete-user-data"] = ->admin_delete_user_data
# Domain operations.
@the_call["user-domain-add"] = ->user_domain_add
@the_call["user-domain-del"] = ->user_domain_del
@ -161,21 +159,9 @@ class Actions
def admin_exit
@dnsmanagerd.admin_exit
rescue e
puts "error for admin_exit: #{e.message}"
puts "error for provide_domain: #{e.message}"
end
# To purge hackers, mostly.
def admin_delete_user_data
users = Context.args.not_nil!
users.each do |user|
puts "purging #{user}"
@dnsmanagerd.admin_delete_user_data user.to_u32
end
rescue e
puts "error for admin_delete_user_data: #{e.message}"
end
def user_domain_add
domains = Context.args.not_nil!
domains.each do |domain|

View file

@ -139,14 +139,6 @@ def parsing_cli(authd_config : Baguette::Configuration::Auth)
parser.banner = "COMMAND: exit"
unrecognized_args_to_context_args.call parser, nil, 0
end
# Purge an account.
parser.on("delete-user-data", "Delete user data.") do
Baguette::Log.info "purge user data."
Context.command = "admin-delete-user-data"
parser.banner = "COMMAND: delete-user-data uid [uid ...]"
unrecognized_args_to_context_args.call parser, nil, 1
end
end
# User section.