+`;
+
exports[`components/signup/Signup should match snapshot for all signup options enabled with isLicensed disabled 1`] = `
{
EnableSignUpWithGoogle: 'true',
EnableSignUpWithOpenId: 'true',
EnableOpenServer: 'true',
+ EnableUserCreation: 'true',
LdapLoginFieldName: '',
GitLabButtonText: '',
GitLabButtonColor: '',
@@ -189,6 +190,16 @@ describe('components/signup/Signup', () => {
expect(wrapper).toMatchSnapshot();
});
+ it('should match snapshot for all signup options enabled with EnableUserCreaton disabled', () => {
+ mockConfig.EnableUserCreation = 'false';
+
+ const wrapper = shallow(
+ ,
+ );
+
+ expect(wrapper).toMatchSnapshot();
+ });
+
it('should create user, log in and redirect to invite teamname', async () => {
mockLocation.search = 'd=%7B"name"%3A"teamName"%7D';
diff --git a/webapp/channels/src/components/signup/signup.tsx b/webapp/channels/src/components/signup/signup.tsx
index f78336292b..7f90ed3b77 100644
--- a/webapp/channels/src/components/signup/signup.tsx
+++ b/webapp/channels/src/components/signup/signup.tsx
@@ -85,6 +85,7 @@ const Signup = ({onCustomizeHeader}: SignupProps) => {
const config = useSelector(getConfig);
const {
EnableOpenServer,
+ EnableUserCreation,
NoAccounts,
EnableSignUpWithEmail,
EnableSignUpWithGitLab,
@@ -117,17 +118,18 @@ const Signup = ({onCustomizeHeader}: SignupProps) => {
const isLicensed = IsLicensed === 'true';
const enableOpenServer = EnableOpenServer === 'true';
+ const enableUserCreation = EnableUserCreation === 'true';
const noAccounts = NoAccounts === 'true';
- const enableSignUpWithEmail = EnableSignUpWithEmail === 'true';
- const enableSignUpWithGitLab = EnableSignUpWithGitLab === 'true';
- const enableSignUpWithGoogle = EnableSignUpWithGoogle === 'true';
- const enableSignUpWithOffice365 = EnableSignUpWithOffice365 === 'true';
- const enableSignUpWithOpenId = EnableSignUpWithOpenId === 'true';
+ const enableSignUpWithEmail = enableUserCreation && EnableSignUpWithEmail === 'true';
+ const enableSignUpWithGitLab = enableUserCreation && EnableSignUpWithGitLab === 'true';
+ const enableSignUpWithGoogle = enableUserCreation && EnableSignUpWithGoogle === 'true';
+ const enableSignUpWithOffice365 = enableUserCreation && EnableSignUpWithOffice365 === 'true';
+ const enableSignUpWithOpenId = enableUserCreation && EnableSignUpWithOpenId === 'true';
const enableLDAP = EnableLdap === 'true';
const enableSAML = EnableSaml === 'true';
const enableCustomBrand = EnableCustomBrand === 'true';
- const noOpenServer = !inviteId && !token && !enableOpenServer && !noAccounts;
+ const noOpenServer = !inviteId && !token && !enableOpenServer && !noAccounts && !enableUserCreation;
const [email, setEmail] = useState(parsedEmail ?? '');
const [name, setName] = useState('');
diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json
index 9ae773205d..aa2cb81dbc 100644
--- a/webapp/channels/src/i18n/en.json
+++ b/webapp/channels/src/i18n/en.json
@@ -2655,7 +2655,7 @@
"admin.team.maxUsersExample": "E.g.: \"25\"",
"admin.team.maxUsersTitle": "Max Users Per Team:",
"admin.team.noBrandImage": "No brand image uploaded",
- "admin.team.openServerDescription": "When true, anyone can signup for a user account on this server without the need to be invited.",
+ "admin.team.openServerDescription": "When true, anyone can sign up for a user account on this server without the need to be invited. Applies to Email-based signups only.",
"admin.team.openServerTitle": "Enable Open Server: ",
"admin.team.refreshPostStatsRunTimeDescription": "Set the server time for updating the user post statistics, including each user's total post count and the timestamp of their most recent post. Must be a 24-hour time stamp in the form HH:MM based on the local time of the server.",
"admin.team.refreshPostStatsRunTimeExample": "E.g.: \"00:00\"",
@@ -2678,7 +2678,7 @@
"admin.team.teammateNameDisplay": "Teammate Name Display:",
"admin.team.teammateNameDisplayDesc": "Set how to display users' names in posts and the Direct Messages list.",
"admin.team.uploadDesc": "Customize your user experience by adding a custom image to your login screen. Recommended maximum image size is less than 2 MB.",
- "admin.team.userCreationDescription": "When false, the ability to create accounts is disabled. The create account button displays error when pressed.",
+ "admin.team.userCreationDescription": "When false, the ability to create accounts is disabled, and selecting Create Account displays an error. Applies to Email, OpenID Connect, and OAuth 2.0 user account authentication.",
"admin.team.userCreationTitle": "Enable Account Creation: ",
"admin.trial_banner.trial-request.error": "Trial license could not be retrieved. Visit {trialInfoLink} to request a license.",
"admin.true": "True",