Commit d97c811d authored by kaiyou's avatar kaiyou

Add a setting named force_oauth

parent 3370a7de
Pipeline #961 passed with stage
in 4 minutes and 19 seconds
......@@ -36,6 +36,7 @@ module Admin
@timeline_preview = Setting.timeline_preview
@spam_check_enabled = Setting.spam_check_enabled
@trends_enabled = Setting.trends
@force_oauth = Setting.force_oauth
end
private
......
......@@ -35,6 +35,7 @@ class Form::AdminSettings
show_domain_blocks
show_domain_blocks_rationale
noindex
force_oauth
).freeze
BOOLEAN_KEYS = %i(
......@@ -51,6 +52,7 @@ class Form::AdminSettings
trends
trendable_by_default
noindex
force_oauth
).freeze
UPLOAD_KEYS = %i(
......
......@@ -71,6 +71,8 @@
= feature_hint(link_to(t('admin.dashboard.feature_relay'), admin_relays_path), @relay_enabled)
%li
= feature_hint(link_to(t('admin.dashboard.feature_spam_check'), edit_admin_settings_path), @spam_check_enabled)
%li
= feature_hint(link_to(t('admin.dashboard.force_oauth'), edit_admin_settings_path), @force_oauth)
.dashboard__widgets__versions
%div
......
......@@ -88,6 +88,9 @@
.fields-group
= f.input :spam_check_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.spam_check_enabled.title'), hint: t('admin.settings.spam_check_enabled.desc_html')
.fields-group
= f.input :force_oauth, as: :boolean, wrapper: :with_label, label: t('admin.settings.force_oauth.title'), hint: t('admin.settings.force_oauth.desc_html')
%hr.spacer/
.fields-group
......
......@@ -566,6 +566,9 @@ en:
spam_check_enabled:
desc_html: Mastodon can auto-report accounts that send repeated unsolicited messages. There may be false positives.
title: Anti-spam automation
force_oauth:
desc_html: If SSO authentication is enabled, Mastodon can completely disable other authentication or registration features.
title: Force SSO authentication
thumbnail:
desc_html: Used for previews via OpenGraph and API. 1200x630px recommended
title: Server thumbnail
......
......@@ -69,6 +69,7 @@ defaults: &defaults
spam_check_enabled: true
show_domain_blocks: 'disabled'
show_domain_blocks_rationale: 'disabled'
force_oauth: false
development:
<<: *defaults
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment