mirror of
https://github.com/mastodon/mastodon.git
synced 2026-10-24 00:09:20 -05:00
Add setting to postpone sending confirmation emails for pending accounts until they are reviewed
This commit is contained in:
@@ -49,6 +49,7 @@ class Form::AdminSettings
|
||||
email_footer_text
|
||||
opt_in_server_directory
|
||||
opt_in_server_recommendation
|
||||
postpone_confirmation_emails
|
||||
).freeze
|
||||
|
||||
INTEGER_KEYS = %i(
|
||||
@@ -73,6 +74,7 @@ class Form::AdminSettings
|
||||
opt_in_server_directory
|
||||
opt_in_server_recommendation
|
||||
wrapstodon
|
||||
postpone_confirmation_emails
|
||||
).freeze
|
||||
|
||||
UPLOAD_KEYS = %i(
|
||||
|
||||
@@ -112,7 +112,7 @@ class User < ApplicationRecord
|
||||
scope :matches_ip, ->(value) { left_joins(:ips).merge(UserIp.contained_by(value)).group(users: [:id]) }
|
||||
|
||||
before_validation :sanitize_role
|
||||
before_create :set_approved
|
||||
before_create :set_approved, prepend: true # Must be called before Devise callbacks
|
||||
before_create :set_age_verified_at
|
||||
after_commit :send_pending_devise_notifications
|
||||
after_create_commit :trigger_webhooks
|
||||
@@ -455,6 +455,8 @@ class User < ApplicationRecord
|
||||
open_registrations? || valid_bypassing_invitation? || external?
|
||||
end
|
||||
end
|
||||
|
||||
self.disabled ||= !approved && Setting.postpone_confirmation_emails
|
||||
end
|
||||
|
||||
def set_age_verified_at
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
as: :boolean,
|
||||
disabled: !approved_registrations?,
|
||||
wrapper: :with_label
|
||||
.fields-group
|
||||
= f.input :postpone_confirmation_emails,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
- if captcha_available?
|
||||
.fields-group
|
||||
|
||||
@@ -98,6 +98,7 @@ en:
|
||||
media_cache_retention_period: Media files from posts made by remote users are cached on your server. When set to a positive value, media will be deleted after the specified number of days. If the media data is requested after it is deleted, it will be re-downloaded, if the source content is still available. Due to restrictions on how often link preview cards poll third-party sites, it is recommended to set this value to at least 14 days, or link preview cards will not be updated on demand before that time.
|
||||
min_age: Users will be asked to confirm their date of birth during sign-up
|
||||
peers_api_enabled: A list of domain names this server has encountered in the fediverse. No data is included here about whether you federate with a given server, just that your server knows about it. This is used by services that collect statistics on federation in a general sense.
|
||||
postpone_confirmation_emails: When this setting is enabled, confirmation emails for accounts pending approval are only sent once those accounts are approved. This may provide a poorer sign-up experience if you are not able to review applications in a timely fashion.
|
||||
profile_directory: The profile directory lists all users who have opted-in to be discoverable.
|
||||
require_invite_text: When sign-ups require manual approval, make the “Why do you want to join?” text input mandatory rather than optional
|
||||
site_contact_email: How people can reach you for legal or support inquiries.
|
||||
@@ -305,6 +306,7 @@ en:
|
||||
media_cache_retention_period: Media cache retention period
|
||||
min_age: Minimum age requirement
|
||||
peers_api_enabled: Publish list of discovered servers in the API
|
||||
postpone_confirmation_emails: Postpone confirmation emails after approval
|
||||
profile_directory: Enable profile directory
|
||||
registrations_mode: Who can sign-up
|
||||
remote_live_feed_access: Access to live feeds featuring remote posts
|
||||
|
||||
@@ -17,6 +17,7 @@ defaults: &defaults
|
||||
local_topic_feed_access: 'public'
|
||||
remote_topic_feed_access: 'public'
|
||||
show_staff_badge: true
|
||||
postpone_confirmation_emails: false
|
||||
preview_sensitive_media: false
|
||||
noindex: false
|
||||
theme: 'default'
|
||||
|
||||
Reference in New Issue
Block a user