Add option to obfuscate domain name in public list of domain blocks (#15355)

- Replace the middle of the domain with * characters (except for periods)
- Add SHA-256 digest of the domain name in tooltip
This commit is contained in:
Eugen Rochko 2020-12-18 08:30:41 +01:00 committed by GitHub
parent b1feb47055
commit 8a95867693
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 48 additions and 4 deletions

View file

@ -7,6 +7,6 @@
- domain_blocks.each do |domain_block|
%tr
%td.nowrap
%span{ title: domain_block.domain }= domain_block.domain
%span{ title: "SHA-256: #{domain_block.domain_digest}" }= domain_block.public_domain
%td
= domain_block.public_comment if display_blocks_rationale?

View file

@ -20,6 +20,9 @@
.fields-group
= f.input :reject_reports, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reports'), hint: I18n.t('admin.domain_blocks.reject_reports_hint')
.fields-group
= f.input :obfuscate, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.obfuscate'), hint: I18n.t('admin.domain_blocks.obfuscate_hint')
.field-group
= f.input :private_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.private_comment'), hint: t('admin.domain_blocks.private_comment_hint'), rows: 6

View file

@ -20,6 +20,9 @@
.fields-group
= f.input :reject_reports, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reports'), hint: I18n.t('admin.domain_blocks.reject_reports_hint')
.fields-group
= f.input :obfuscate, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.obfuscate'), hint: I18n.t('admin.domain_blocks.obfuscate_hint')
.field-group
= f.input :private_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.private_comment'), hint: t('admin.domain_blocks.private_comment_hint'), rows: 6