Default to registration phase when custom URLs disabled

This commit is contained in:
J. Ryan Stinnett 2019-02-05 05:25:13 +00:00
parent 24db3e4804
commit 5432b09478
2 changed files with 4 additions and 2 deletions

View file

@ -560,7 +560,6 @@ module.exports = React.createClass({
const ModularServerConfig = sdk.getComponent("auth.ModularServerConfig"); const ModularServerConfig = sdk.getComponent("auth.ModularServerConfig");
const AccessibleButton = sdk.getComponent("elements.AccessibleButton"); const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
// TODO: May need to adjust the behavior of this config option
if (SdkConfig.get()['disable_custom_urls']) { if (SdkConfig.get()['disable_custom_urls']) {
return null; return null;
} }

View file

@ -69,6 +69,8 @@ module.exports = React.createClass({
}, },
getInitialState: function() { getInitialState: function() {
const customURLsAllowed = !SdkConfig.get()['disable_custom_urls'];
return { return {
busy: false, busy: false,
errorText: null, errorText: null,
@ -90,6 +92,8 @@ module.exports = React.createClass({
serverType: null, serverType: null,
hsUrl: this.props.customHsUrl, hsUrl: this.props.customHsUrl,
isUrl: this.props.customIsUrl, isUrl: this.props.customIsUrl,
// Phase of the overall registration dialog.
phase: customURLsAllowed ? PHASE_SERVER_DETAILS : PHASE_REGISTRATION,
flows: null, flows: null,
}; };
}, },
@ -367,7 +371,6 @@ module.exports = React.createClass({
const ModularServerConfig = sdk.getComponent("auth.ModularServerConfig"); const ModularServerConfig = sdk.getComponent("auth.ModularServerConfig");
const AccessibleButton = sdk.getComponent("elements.AccessibleButton"); const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
// TODO: May need to adjust the behavior of this config option
if (SdkConfig.get()['disable_custom_urls']) { if (SdkConfig.get()['disable_custom_urls']) {
return null; return null;
} }