Remove the terms blacklist and whitelist from UX (#14149)
Localization strings: - "Whitelist mode" -> "Limited federation mode" - "Blacklist e-mail domain" -> "Block e-mail domain" - "Whitelist domain" -> "Allow domain for federation" ...And so on Environment variables (backwards-compatible): - `WHITELIST_MODE` -> `LIMITED_FEDERATION_MODE` - `EMAIL_DOMAIN_BLACKLIST` -> `EMAIL_DOMAIN_DENYLIST` - `EMAIL_DOMAIN_WHITELIST` -> `EMAIL_DOMAIN_ALLOWLIST` tootctl: - `tootctl domains purge --whitelist-mode` -> `tootctl domains purge --limited-federation-mode` Removed badly maintained and no longer relevant .env.production.sample file
This commit is contained in:
		
							parent
							
								
									4662afe075
								
							
						
					
					
						commit
						8c04e37b03
					
				
					 5 changed files with 24 additions and 286 deletions
				
			
		|  | @ -16,22 +16,22 @@ module Mastodon | |||
|     option :concurrency, type: :numeric, default: 5, aliases: [:c] | ||||
|     option :verbose, type: :boolean, aliases: [:v] | ||||
|     option :dry_run, type: :boolean | ||||
|     option :whitelist_mode, type: :boolean | ||||
|     option :limited_federation_mode, type: :boolean | ||||
|     desc 'purge [DOMAIN...]', 'Remove accounts from a DOMAIN without a trace' | ||||
|     long_desc <<-LONG_DESC | ||||
|       Remove all accounts from a given DOMAIN without leaving behind any | ||||
|       records. Unlike a suspension, if the DOMAIN still exists in the wild, | ||||
|       it means the accounts could return if they are resolved again. | ||||
| 
 | ||||
|       When the --whitelist-mode option is given, instead of purging accounts | ||||
|       from a single domain, all accounts from domains that are not whitelisted | ||||
|       When the --limited-federation-mode option is given, instead of purging accounts | ||||
|       from a single domain, all accounts from domains that have not been explicitly allowed | ||||
|       are removed from the database. | ||||
|     LONG_DESC | ||||
|     def purge(*domains) | ||||
|       dry_run = options[:dry_run] ? ' (DRY RUN)' : '' | ||||
| 
 | ||||
|       scope = begin | ||||
|         if options[:whitelist_mode] | ||||
|         if options[:limited_federation_mode] | ||||
|           Account.remote.where.not(domain: DomainAllow.pluck(:domain)) | ||||
|         elsif !domains.empty? | ||||
|           Account.remote.where(domain: domains) | ||||
|  |  | |||
		Reference in a new issue