fix: Disable guest signin option with not SMTP setup

closes #2250
This commit is contained in:
Tom Moor
2021-10-14 21:59:35 -07:00
parent 26e2ae4bf1
commit 583353e904
4 changed files with 10 additions and 4 deletions

View File

@@ -107,7 +107,7 @@ function Notifications() {
</Trans>
</HelpText>
{env.NOTIFICATIONS_ENABLED ? (
{env.EMAIL_ENABLED ? (
<>
<Input
type="email"

View File

@@ -9,6 +9,7 @@ import Checkbox from "components/Checkbox";
import Heading from "components/Heading";
import HelpText from "components/HelpText";
import Scene from "components/Scene";
import env from "env";
import useCurrentTeam from "hooks/useCurrentTeam";
import useStores from "hooks/useStores";
import useToasts from "hooks/useToasts";
@@ -60,7 +61,12 @@ function Security() {
name="guestSignin"
checked={data.guestSignin}
onChange={handleChange}
note={t("When enabled, users can sign-in using their email address")}
note={
env.EMAIL_ENABLED
? t("When enabled, users can sign-in using their email address")
: t("The server must have SMTP configured to enable this setting")
}
disabled={!env.EMAIL_ENABLED}
/>
<Checkbox
label={t("Public document sharing")}

View File

@@ -17,7 +17,7 @@ export default function present(env: Object): Object {
SLACK_APP_ID: env.SLACK_APP_ID,
MAXIMUM_IMPORT_SIZE: env.MAXIMUM_IMPORT_SIZE || 1024 * 1000 * 5,
SUBDOMAINS_ENABLED: env.SUBDOMAINS_ENABLED === "true",
NOTIFICATIONS_ENABLED:
EMAIL_ENABLED:
!!env.SMTP_USERNAME || env.NODE_ENV === "development",
GOOGLE_ANALYTICS_ID: env.GOOGLE_ANALYTICS_ID,
RELEASE: env.SOURCE_COMMIT || env.SOURCE_VERSION || undefined,

View File

@@ -549,7 +549,7 @@
"Unsubscription successful. Your notification settings were updated": "Unsubscription successful. Your notification settings were updated",
"Manage when and where you receive email notifications from Outline. Your email address can be updated in your SSO provider.": "Manage when and where you receive email notifications from Outline. Your email address can be updated in your SSO provider.",
"Email address": "Email address",
"The email integration is currently disabled. Please set the associated environment variables and restart the server to enable the integration.": "The email integration is currently disabled. Please set the associated environment variables and restart the server to enable the integration.",
"The email integration is currently disabled. Please set the associated environment variables and restart the server to enable notifications.": "The email integration is currently disabled. Please set the associated environment variables and restart the server to enable notifications.",
"Everyone that has signed into Outline appears here. Its possible that there are other users who have access through {team.signinMethods} but havent signed in yet.": "Everyone that has signed into Outline appears here. Its possible that there are other users who have access through {team.signinMethods} but havent signed in yet.",
"Filter": "Filter",
"Profile saved": "Profile saved",