Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
TeDomum
Mastodon
Commits
d97c811d
Commit
d97c811d
authored
May 01, 2020
by
kaiyou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a setting named force_oauth
parent
3370a7de
Pipeline
#961
passed with stage
in 4 minutes and 19 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
0 deletions
+12
-0
app/controllers/admin/dashboard_controller.rb
app/controllers/admin/dashboard_controller.rb
+1
-0
app/models/form/admin_settings.rb
app/models/form/admin_settings.rb
+2
-0
app/views/admin/dashboard/index.html.haml
app/views/admin/dashboard/index.html.haml
+2
-0
app/views/admin/settings/edit.html.haml
app/views/admin/settings/edit.html.haml
+3
-0
config/locales/en.yml
config/locales/en.yml
+3
-0
config/settings.yml
config/settings.yml
+1
-0
No files found.
app/controllers/admin/dashboard_controller.rb
View file @
d97c811d
...
...
@@ -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
...
...
app/models/form/admin_settings.rb
View file @
d97c811d
...
...
@@ -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(
...
...
app/views/admin/dashboard/index.html.haml
View file @
d97c811d
...
...
@@ -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
...
...
app/views/admin/settings/edit.html.haml
View file @
d97c811d
...
...
@@ -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
...
...
config/locales/en.yml
View file @
d97c811d
...
...
@@ -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
...
...
config/settings.yml
View file @
d97c811d
...
...
@@ -69,6 +69,7 @@ defaults: &defaults
spam_check_enabled
:
true
show_domain_blocks
:
'
disabled'
show_domain_blocks_rationale
:
'
disabled'
force_oauth
:
false
development
:
<<
:
*defaults
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment