Add DISABLE_ONBOARDING param
This commit is contained in:
parent
cde8452e5b
commit
92cd75f14a
|
@ -272,3 +272,6 @@ ALERT_SPAM_EMAIL = "spam"
|
||||||
ALERT_SPF = "spf"
|
ALERT_SPF = "spf"
|
||||||
|
|
||||||
# <<<<< END ALERT EMAIL >>>>
|
# <<<<< END ALERT EMAIL >>>>
|
||||||
|
|
||||||
|
# Disable onboarding emails
|
||||||
|
DISABLE_ONBOARDING = "DISABLE_ONBOARDING" in os.environ
|
||||||
|
|
|
@ -24,6 +24,7 @@ from app.config import (
|
||||||
JOB_ONBOARDING_4,
|
JOB_ONBOARDING_4,
|
||||||
LANDING_PAGE_URL,
|
LANDING_PAGE_URL,
|
||||||
FIRST_ALIAS_DOMAIN,
|
FIRST_ALIAS_DOMAIN,
|
||||||
|
DISABLE_ONBOARDING,
|
||||||
)
|
)
|
||||||
from app.errors import AliasInTrashError
|
from app.errors import AliasInTrashError
|
||||||
from app.extensions import db
|
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)
|
Alias.create_new(user, prefix="my-first-alias", mailbox_id=mb.id)
|
||||||
db.session.flush()
|
db.session.flush()
|
||||||
|
|
||||||
|
if DISABLE_ONBOARDING:
|
||||||
|
LOG.d("Disable onboarding emails")
|
||||||
|
return user
|
||||||
|
|
||||||
# Schedule onboarding emails
|
# Schedule onboarding emails
|
||||||
Job.create(
|
Job.create(
|
||||||
name=JOB_ONBOARDING_1,
|
name=JOB_ONBOARDING_1,
|
||||||
|
|
|
@ -129,4 +129,8 @@ FACEBOOK_CLIENT_SECRET=to_fill
|
||||||
|
|
||||||
# Used when querying info on Apple API
|
# Used when querying info on Apple API
|
||||||
# APPLE_API_SECRET=secret
|
# 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 New Issue