diff --git a/app/scenes/Settings/Security.tsx b/app/scenes/Settings/Security.tsx index f978340d5..96861eca4 100644 --- a/app/scenes/Settings/Security.tsx +++ b/app/scenes/Settings/Security.tsx @@ -84,26 +84,26 @@ function Security() { [data, saveData] ); - const handleAllowSignupsChange = React.useCallback( + const handleInviteRequiredChange = React.useCallback( async (ev: React.ChangeEvent) => { - const inviteRequired = !ev.target.checked; + const inviteRequired = ev.target.checked; const newData = { ...data, inviteRequired }; if (inviteRequired) { dialogs.openModal({ isCentered: true, - title: t("Are you sure you want to disable authorized signups?"), + title: t("Are you sure you want to require invites?"), content: ( { await saveData(newData); }} - submitText={t("I’m sure — Disable")} - savingText={`${t("Disabling")}…`} + submitText={t("I’m sure")} + savingText={`${t("Saving")}…`} danger > {isCloudHosted && ( , - }} - /> - } + label={t("Require invites")} + name="inviteRequired" + description={t( + "Require members to be invited to the team before they can create an account using SSO." + )} > )} - - - - - - {data.allowedDomains && - data.allowedDomains.map((domain, index) => ( - - - - - handleRemoveDomain(index)}> - - - - - - ))} - - - {!data.allowedDomains?.length || - data.allowedDomains[data.allowedDomains.length - 1] !== "" ? ( - - - - ) : ( - + {!data.inviteRequired && ( + + + + )} - {domainsChanged && ( - - - + {!data.inviteRequired && ( + - + > + {data.allowedDomains && + data.allowedDomains.map((domain, index) => ( + + + + + handleRemoveDomain(index)}> + + + + + + ))} + + + {!data.allowedDomains?.length || + data.allowedDomains[data.allowedDomains.length - 1] !== "" ? ( + + + + ) : ( + + )} + + {domainsChanged && ( + + + + )} + + + )} ); } diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json index bd028ab50..ccd961785 100644 --- a/shared/i18n/locales/en_US/translation.json +++ b/shared/i18n/locales/en_US/translation.json @@ -668,10 +668,9 @@ "Delete Account": "Delete Account", "You may delete your account at any time, note that this is unrecoverable": "You may delete your account at any time, note that this is unrecoverable", "Delete account": "Delete account", - "Are you sure you want to disable authorized signups?": "Are you sure you want to disable authorized signups?", - "I’m sure — Disable": "I’m sure — Disable", - "Disabling": "Disabling", - "New account creation using {{ authenticationMethods }} will be disabled. New users will need to be invited.": "New account creation using {{ authenticationMethods }} will be disabled. New users will need to be invited.", + "Are you sure you want to require invites?": "Are you sure you want to require invites?", + "I’m sure": "I’m sure", + "New users will first need to be invited to create an account using {{ authenticationMethods }}. Default role and Allowed domains will no longer apply.": "New users will first need to be invited to create an account using {{ authenticationMethods }}. Default role and Allowed domains will no longer apply.", "Settings that impact the access, security, and content of your knowledge base.": "Settings that impact the access, security, and content of your knowledge base.", "Allow email authentication": "Allow email authentication", "When enabled, users can sign-in using their email address": "When enabled, users can sign-in using their email address", @@ -681,12 +680,12 @@ "Links to supported services are shown as rich embeds within your documents": "Links to supported services are shown as rich embeds within your documents", "Collection creation": "Collection creation", "Allow members to create new collections within the knowledge base": "Allow members to create new collections within the knowledge base", - "Allow authorized signups": "Allow authorized signups", - "Allow authorized {{ authenticationMethods }} users to create new accounts without first receiving an invite": "Allow authorized {{ authenticationMethods }} users to create new accounts without first receiving an invite", + "Require invites": "Require invites", + "Require members to be invited to the team before they can create an account using SSO.": "Require members to be invited to the team before they can create an account using SSO.", "Default role": "Default role", "The default user role for new accounts. Changing this setting does not affect existing user accounts.": "The default user role for new accounts. Changing this setting does not affect existing user accounts.", - "Allowed Domains": "Allowed Domains", - "The domains which should be allowed to create accounts. This applies to both SSO and Email logins. Changing this setting does not affect existing user accounts.": "The domains which should be allowed to create accounts. This applies to both SSO and Email logins. Changing this setting does not affect existing user accounts.", + "Allowed domains": "Allowed domains", + "The domains which should be allowed to create new accounts using SSO. Changing this setting does not affect existing user accounts.": "The domains which should be allowed to create new accounts using SSO. Changing this setting does not affect existing user accounts.", "Remove domain": "Remove domain", "Add a domain": "Add a domain", "Save changes": "Save changes",