mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-02-12 11:12:44 +00:00
docker: DISABLE_ACCOUNT_CREATION -> DISABLE_SIGNUPS
This commit is contained in:
12
.env
12
.env
@@ -9,8 +9,8 @@ NOTESNOOK_API_SECRET=
|
||||
|
||||
# Description: Use this flag to disable creation of new accounts on your instance (i.e. in case it is exposed to the Internet).
|
||||
# Required: yes
|
||||
# Possible values: 0 for false; 1 for true
|
||||
DISABLE_ACCOUNT_CREATION=0
|
||||
# Possible values: true/false
|
||||
DISABLE_SIGNUPS=false
|
||||
|
||||
### SMTP Configuration ###
|
||||
# SMTP Configuration is required for sending emails for password reset, 2FA emails etc. You can get SMTP settings from your email provider.
|
||||
@@ -29,14 +29,6 @@ SMTP_HOST=
|
||||
# Required: yes
|
||||
# Example: 465
|
||||
SMTP_PORT=
|
||||
# Description: The FROM email address when sending out emails. Must be an email address under your control otherwise sending will fail. Most times it is the same email address as the SMTP_USERNAME.
|
||||
# Required: no
|
||||
# Example: support@notesnook.com
|
||||
NOTESNOOK_SENDER_EMAIL=
|
||||
# Description: The reply-to email is used whenever a user is replying to the email you sent. You can use this to set a different reply-to email address than the one you used to send the email.
|
||||
# Required: no
|
||||
# Example: support@notesnook.com
|
||||
SMTP_REPLYTO_EMAIL=
|
||||
|
||||
# Description: Twilio account SID is required for sending SMS with 2FA codes. Learn more here: https://help.twilio.com/articles/14726256820123-What-is-a-Twilio-Account-SID-and-where-can-I-find-it-
|
||||
# Required: no
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Streetwriters.Common
|
||||
{
|
||||
public static int COMPATIBILITY_VERSION = 1;
|
||||
public static bool IS_SELF_HOSTED => Environment.GetEnvironmentVariable("SELF_HOSTED") == "1";
|
||||
public static bool DISABLE_ACCOUNT_CREATION => Environment.GetEnvironmentVariable("DISABLE_ACCOUNT_CREATION") == "1";
|
||||
public static bool DISABLE_SIGNUPS => Environment.GetEnvironmentVariable("DISABLE_SIGNUPS") == "true";
|
||||
public static string INSTANCE_NAME => Environment.GetEnvironmentVariable("INSTANCE_NAME") ?? "default";
|
||||
|
||||
// S3 related
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Streetwriters.Identity.Controllers
|
||||
[AllowAnonymous]
|
||||
public async Task<IActionResult> Signup([FromForm] SignupForm form)
|
||||
{
|
||||
if (Constants.DISABLE_ACCOUNT_CREATION)
|
||||
if (Constants.DISABLE_SIGNUPS)
|
||||
return BadRequest(new string[] { "Creating new accounts is not allowed." });
|
||||
try
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ services:
|
||||
required_vars=(
|
||||
"INSTANCE_NAME"
|
||||
"NOTESNOOK_API_SECRET"
|
||||
"DISABLE_ACCOUNT_CREATION"
|
||||
"DISABLE_SIGNUPS"
|
||||
"SMTP_USERNAME"
|
||||
"SMTP_PASSWORD"
|
||||
"SMTP_HOST"
|
||||
|
||||
Reference in New Issue
Block a user