-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into issue/1336
* develop: Require modules before plugins Change to ensureDirSync Fixes #1906 Allow MongoDB authentication in install script Fix modules define Fix globalData Save isVisible and isHidden on blocks and components Fix context menu for page Remove config-sample.json Allow upgrade if missing frameworkRepository or authoringToolRepository Catch errors and return Fix route error logging fixed indenting update mailer to support custom connection url prompt user if custom connection url is used and dynamically build prompt also fixes issue with config options not added to config.json update config sample to include new config options Add instruction to component schema # Conflicts: # frontend/src/core/app.js
- Loading branch information
Showing
12 changed files
with
157 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,27 @@ installHelpers.getLatestFrameworkVersion(function(error, latestFrameworkTag) { | |
pattern: installHelpers.inputHelpers.numberValidator, | ||
default: 27017 | ||
}, | ||
{ | ||
name: 'dbUser', | ||
type: 'string', | ||
description: 'Database server user', | ||
pattern: installHelpers.inputHelpers.alphanumValidator, | ||
default: '' | ||
}, | ||
{ | ||
name: 'dbPass', | ||
type: 'string', | ||
description: 'Database server password', | ||
pattern: installHelpers.inputHelpers.alphanumValidator, | ||
default: '' | ||
}, | ||
{ | ||
name: 'dbAuthSource', | ||
type: 'string', | ||
description: 'Database server authentication database', | ||
pattern: installHelpers.inputHelpers.alphanumValidator, | ||
default: 'admin' | ||
}, | ||
{ | ||
name: 'dataRoot', | ||
type: 'string', | ||
|
@@ -128,7 +149,28 @@ installHelpers.getLatestFrameworkVersion(function(error, latestFrameworkTag) { | |
before: installHelpers.inputHelpers.toBoolean, | ||
default: 'N' | ||
}, | ||
confirmConnectionUrl: { | ||
name: 'useSmtpConnectionUrl', | ||
type: 'string', | ||
description: "Will you use a URL to connect to your smtp Server y/N", | ||
before: installHelpers.inputHelpers.toBoolean, | ||
default: 'N' | ||
}, | ||
configure: [ | ||
{ | ||
name: 'fromAddress', | ||
type: 'string', | ||
description: "Sender email address", | ||
default: '', | ||
}, | ||
{ | ||
name: 'rootUrl', | ||
type: 'string', | ||
description: "The url this install will be accessible from", | ||
default: '' // set using default server options | ||
} | ||
], | ||
configureService: [ | ||
{ | ||
name: 'smtpService', | ||
type: 'string', | ||
|
@@ -149,18 +191,14 @@ installHelpers.getLatestFrameworkVersion(function(error, latestFrameworkTag) { | |
replace: installHelpers.inputHelpers.passwordReplace, | ||
default: '', | ||
before: installHelpers.inputHelpers.passwordBefore | ||
}, | ||
{ | ||
name: 'fromAddress', | ||
type: 'string', | ||
description: "Sender email address", | ||
default: '', | ||
}, | ||
} | ||
], | ||
configureConnectionUrl: [ | ||
{ | ||
name: 'rootUrl', | ||
name: 'smtpConnectionUrl', | ||
type: 'string', | ||
description: "The url this install will be accessible from", | ||
default: '' // set using default server options | ||
description: "Custom connection URL: smtps://user%40gmail.com:[email protected]/?pool=true", | ||
default: 'none', | ||
} | ||
] | ||
} | ||
|
@@ -218,6 +256,7 @@ installHelpers.getLatestFrameworkVersion(function(error, latestFrameworkTag) { | |
} | ||
console.log(''); | ||
if(!fs.existsSync('conf/config.json')) { | ||
fs.ensureDirSync('conf'); | ||
return start(); | ||
} | ||
console.log('Found an existing config.json file. Do you want to use the values in this file during install?'); | ||
|
@@ -300,14 +339,24 @@ function configureFeatures(callback) { | |
if(!result.useSmtp || USE_CONFIG && configResults.useSmtp !== 'y') { | ||
return cb(); | ||
} | ||
for(var i = 0, count = inputData.features.smtp.configure.length; i < count; i++) { | ||
if(inputData.features.smtp.configure[i].name === 'rootUrl') { | ||
inputData.features.smtp.configure[i].default = `http://${configResults.serverName}:${configResults.serverPort}`; | ||
} | ||
} | ||
installHelpers.getInput(inputData.features.smtp.configure, function(result) { | ||
// prompt user if custom connection url or well-known-service should be used | ||
installHelpers.getInput(inputData.features.smtp.confirmConnectionUrl, function(result) { | ||
addConfig(result); | ||
cb(); | ||
var smtpConfig; | ||
if (result.useSmtpConnectionUrl === true) { | ||
smtpConfig = inputData.features.smtp.configure.concat(inputData.features.smtp.configureConnectionUrl); | ||
} else { | ||
smtpConfig = inputData.features.smtp.configure.concat(inputData.features.smtp.configureService); | ||
} | ||
for(var i = 0, count = smtpConfig.length; i < count; i++) { | ||
if(smtpConfig[i].name === 'rootUrl') { | ||
smtpConfig[i].default = `http://${configResults.serverName}:${configResults.serverPort}`; | ||
} | ||
} | ||
installHelpers.getInput(smtpConfig, function(result) { | ||
addConfig(result); | ||
cb(); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.