mirror of
https://github.com/simple-login/app.git
synced 2025-02-21 22:32:56 +08:00
Add DISABLE_ONBOARDING param
This commit is contained in:
parent
cde8452e5b
commit
92cd75f14a
3 changed files with 13 additions and 1 deletions
|
@ -272,3 +272,6 @@ ALERT_SPAM_EMAIL = "spam"
|
|||
ALERT_SPF = "spf"
|
||||
|
||||
# <<<<< END ALERT EMAIL >>>>
|
||||
|
||||
# Disable onboarding emails
|
||||
DISABLE_ONBOARDING = "DISABLE_ONBOARDING" in os.environ
|
||||
|
|
|
@ -24,6 +24,7 @@ from app.config import (
|
|||
JOB_ONBOARDING_4,
|
||||
LANDING_PAGE_URL,
|
||||
FIRST_ALIAS_DOMAIN,
|
||||
DISABLE_ONBOARDING,
|
||||
)
|
||||
from app.errors import AliasInTrashError
|
||||
from app.extensions import db
|
||||
|
@ -204,6 +205,10 @@ class User(db.Model, ModelMixin, UserMixin):
|
|||
Alias.create_new(user, prefix="my-first-alias", mailbox_id=mb.id)
|
||||
db.session.flush()
|
||||
|
||||
if DISABLE_ONBOARDING:
|
||||
LOG.d("Disable onboarding emails")
|
||||
return user
|
||||
|
||||
# Schedule onboarding emails
|
||||
Job.create(
|
||||
name=JOB_ONBOARDING_1,
|
||||
|
|
|
@ -129,4 +129,8 @@ FACEBOOK_CLIENT_SECRET=to_fill
|
|||
|
||||
# Used when querying info on Apple API
|
||||
# APPLE_API_SECRET=secret
|
||||
# MACAPP_APPLE_API_SECRET=secret
|
||||
# MACAPP_APPLE_API_SECRET=secret
|
||||
|
||||
# Disable onboarding emails
|
||||
# For self-hosted instance
|
||||
DISABLE_ONBOARDING=true
|
Loading…
Reference in a new issue