Change: ホワイトリスト全体を有効にするオプション (#593)
This commit is contained in:
parent
dfc9f35d71
commit
1efeedf896
6 changed files with 20 additions and 0 deletions
|
@ -65,6 +65,7 @@ class Form::AdminSettings
|
|||
enable_local_timeline
|
||||
emoji_reaction_disallow_domains
|
||||
permit_new_account_domains
|
||||
hold_remote_new_accounts
|
||||
).freeze
|
||||
|
||||
INTEGER_KEYS = %i(
|
||||
|
@ -107,6 +108,7 @@ class Form::AdminSettings
|
|||
stranger_mention_from_local_ng
|
||||
enable_local_timeline
|
||||
delete_content_cache_without_reaction
|
||||
hold_remote_new_accounts
|
||||
).freeze
|
||||
|
||||
UPLOAD_KEYS = %i(
|
||||
|
|
|
@ -140,6 +140,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
end
|
||||
|
||||
def blocking_new_account?
|
||||
return false unless Setting.hold_remote_new_accounts
|
||||
return false if permit_new_account_domains.blank?
|
||||
|
||||
permit_new_account_domains.exclude?(@domain)
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
= t 'admin.ng_words.remote_approval_hint'
|
||||
= link_to t('admin.ng_words.remote_approval_list'), admin_accounts_path(status: 'remote_pending', origin: 'remote')
|
||||
|
||||
.fields-group
|
||||
= f.input :hold_remote_new_accounts, wrapper: :with_label, as: :boolean, label: t('admin.ng_words.hold_remote_new_accounts')
|
||||
|
||||
.fields-group
|
||||
= f.input :permit_new_account_domains, wrapper: :with_label, as: :text, kmyblue: true, input_html: { rows: 6 }, label: t('admin.ng_words.permit_new_account_domains')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue