Commit Graph

21 Commits (v3.4.6)

Author SHA1 Message Date
Claire a1e5ff04e3 Fix tootctl self-destruct not sending Delete activities for recently-suspended accounts (#16688)
* Do not block existing users' emails on self-destruct

That is wasteful and unintuitive

* Do not close registrations when running tootctl self-destruct with --dry-run

* Close registrations on self-destruct regardless of known remote accounts

* Fix tootctl self-destruct not sending Deletes for recently-suspended accounts

* Suspend local users even if no remote account is known

* Do not show scary confirmation text if ran with --dry-run
3 years ago
ThibG 1242e57c27
Deal with collation-related index corruption (#14860)
* Add tootctl maintenance fix-duplicates

This tool goes through the database to detect and fix duplicates.
This operation is very slow and may cause data loss (of data that would be
inaccessible without intervention because of the existing index corruptions).
It tries its best to make sensible decisions, and asks the user in some cases.

* Add warning message in db:migrate hook

* Clear Rails cache after being done with database deduplication

Avoids followers hash cache being incorrect, among other things
4 years ago
Eugen Rochko 5e1364c448
Add IP-based rules (#14963) 4 years ago
Eugen Rochko 4662afe075
Fix help text around `tootctl email_domain_blocks` (#14147) 4 years ago
tateisu 370e38ee15
Add tootctl email-domain-blocks (#13589)
* Add tootctl email_domains (block|unblock)

* fix codeclimate issues.

* fix codeclimate issues.

* fix codeclimate issues.

* add list subcommand, remove log_action.

* fix codeclimate issues.

* filter duplicate hostnames,ips before block

* rebase from currnet master branch.
rename email_domains_cli.rb to email_domain_blocks_cli.rb .
rename Mastodon::EmailDomainsCLI to Mastodon::EmailDomainBlocksCLI .
rename command email_domains to email-domain-blocks . (Thor recognizes both of - and _ )
rename subcommand block to add .
rename subcommand unblock to remove .
change the color in list subcommand to while for domain or cyan for childlen.
don't use include() in list subcommand.
suppress console output about succeeded entry.
add console output about count of processed/skipped.
remove capitalization in subcommand description.
remove long_desc in subcommand 'remove'.
remove duplicate where in subcommand 'remove'.

* fix codeclimate issue.
4 years ago
Eugen Rochko c3ca3801f2
Add separate cache directory for non-local uploads (#12821) 4 years ago
Jeong Arm 26988be57d Close registration before self-destruct (#12877) 4 years ago
mayaeh 0d80f686d8 Add `tootctl preview_cards remove` (#11320)
* Add `tootctl preview_cards remove`

* fix code style

* Remove `Scheduler::PreviewCardsCleanupScheduler` file

* fix code style again
Add exclude case where image_file_name is blank

* Added a function to output confirmation if the specified number of days is less than 2 weeks
5 years ago
ThibG 14f6ce2885 Record account suspend/silence time and keep track of domain blocks (#10660)
* Record account suspend/silence time and keep track of domain blocks

* Also unblock users who were suspended/silenced before dates were recorded

* Add tests

* Keep track of suspending date for users suspended through the CLI

* Show accurate number of accounts that would be affected by unsuspending an instance

* Change migration to set silenced_at and suspended_at

* Revert "Also unblock users who were suspended/silenced before dates were recorded"

This reverts commit a015c65d2d1e28c7b7cfab8b3f8cd5fb48b8b71c.

* Switch from using suspended and silenced to suspended_at and silenced_at

* Add post-deployment migration script to remove `suspended` and `silenced` columns

* Use Account#silence! and Account#suspend! instead of updating the underlying property

* Add silenced_at and suspended_at migration to post-migration

* Change account fabricator to translate suspended and silenced attributes

* Minor fixes

* Make unblocking domains always retroactive
5 years ago
Eugen Rochko 8025a41a1f
Add `tootctl cache clear` (#10689) 5 years ago
Eugen Rochko 026dd75208
Add `tootctl self-destruct` (#10367)
Fix #10305
5 years ago
Eugen Rochko 5d41532d94
Add `tootctl search deploy` to avoid ugly rake task syntax (#10403) 5 years ago
Eugen Rochko 67665023c3
Add `tootctl statuses remove` to sweep unreferenced statuses (#10063)
Query by @tateisu

Fix #1554
5 years ago
Eugen Rochko 3c218cd76d
Add `tootctl --version` (#9835) 5 years ago
Eugen Rochko 6f78500d4f
Do not remove "dead" domains in tootctl accounts cull (#9108)
Leave `tootctl accounts cull` to simply check removed accounts from
live domains, and skip temporarily unavailable domains, while listing
them in the final output for further action.

Add `tootctl domains purge DOMAIN` to be able to purge a domain from
that list manually
6 years ago
Sascha b9d7021c1b cli: set exit_on_failure for all CLI classes (#9094) 6 years ago
Eugen Rochko 186024a058
Add tootctl settings registrations open (#8829) 6 years ago
Eugen Rochko 6a3f9b7e53
Move more tasks to tootctl (#8675)
* Move more tasks to tootctl

- tootctl feeds build
- tootctl feeds clear
- tootctl accounts refresh

Clean up exit codes and help messages

* Move user modifying to tootctl

* Improve user modification through CLI, rename commands

add -> create
mod -> modify
del -> delete

To remove ambiguity

* Fix code style issues

* Fix not being able to unset admin/mod role
6 years ago
Eugen Rochko cabdbb7f9c
Add CLI task for rotating keys (#8466)
* If an Update is signed with known key, skip re-following procedure

Because it means the remote actor did *not* lose their database

* Add CLI method for rotating keys

    bin/tootctl accounts rotate [USERNAME]

Generates a new RSA key per account and sends out an Update activity
signed with the old key.

* Key rotation: Space out Update fan-outs every 5 minutes per 1000 accounts

* Skip suspended accounts in key rotation
6 years ago
Eugen Rochko b378b4c5c7
Add CLI interface for importing custom emoji (#8437)
bin/tootctl emoji import PATH_TO_TAR

Fix #8435
6 years ago
Eugen Rochko 793eea2982
Add improved CLI interface for removing remote media (#8411)
./bin/tootctl media remove --days 7 --background

Make the old rake task point to it
6 years ago