Compare commits

...

6 Commits
v4.2.2 ... 1.10

Author SHA1 Message Date
Johannes Zellner
6f6afa1b6a Add 1.10.2 changes 2018-02-07 15:34:24 +01:00
Johannes Zellner
3634e47794 Keep the invite email for users, which have not yet setup a username 2018-02-07 15:33:35 +01:00
Girish Ramakrishnan
5be39bc271 createReleaseTarball: Make sure we pick the current branch on webadmin 2018-02-06 16:18:42 -08:00
Girish Ramakrishnan
6b55d7585c Add 1.10.1 changes 2018-02-06 16:11:21 -08:00
Johannes Zellner
8e4b3f9a4a Drop users email unique constraint for the migration timeframe 2018-02-06 12:19:13 +01:00
Girish Ramakrishnan
15cf0c3c19 Do not allow dns setup and restore to run in parallel
In the e2e, we did not check the webadminStatus after a dnsSetup
and immediately rushed into restore. This ended up mangling the
cert/key files of the admin domain.
2018-02-04 15:08:48 -08:00
4 changed files with 25 additions and 3 deletions

15
CHANGES
View File

@@ -1190,3 +1190,18 @@
* Add DigitalOcean Spaces region Singapore 1 (SGP1)
* Configure Exoscale SOS to use new SOS NG endpoint
* Fix S3 storage backend CopySource encoding rules
[1.10.1]
* Migrate mailboxes to support multiple domains
* Update addon containers to latest versions
* Add DigitalOcean Spaces region Singapore 1 (SGP1)
* Configure Exoscale SOS to use new SOS NG endpoint
* Fix S3 storage backend CopySource encoding rules
[1.10.2]
* Migrate mailboxes to support multiple domains
* Update addon containers to latest versions
* Add DigitalOcean Spaces region Singapore 1 (SGP1)
* Configure Exoscale SOS to use new SOS NG endpoint
* Fix S3 storage backend CopySource encoding rules

View File

@@ -11,6 +11,7 @@ exports.up = function(db, callback) {
async.series([
db.runSql.bind(db, 'START TRANSACTION;'),
db.runSql.bind(db, 'ALTER TABLE users DROP INDEX users_email'),
db.runSql.bind(db, 'ALTER TABLE users ADD COLUMN fallbackEmail VARCHAR(512) DEFAULT ""'),
function setDefaults(done) {
async.eachSeries(users, function (user, iteratorCallback) {
@@ -21,13 +22,14 @@ exports.up = function(db, callback) {
defaultEmail = user.email;
fallbackEmail = user.email;
} else {
defaultEmail = user.username + '@' + mailDomains[0].domain;
defaultEmail = user.username ? (user.username + '@' + mailDomains[0].domain) : user.email;
fallbackEmail = user.email;
}
db.runSql('UPDATE users SET email = ?, fallbackEmail = ? WHERE id = ?', [ defaultEmail, fallbackEmail, user.id ], iteratorCallback);
}, done);
},
db.runSql.bind(db, 'ALTER TABLE users ADD UNIQUE users_email (email)'),
db.runSql.bind(db, 'COMMIT')
], callback);
});

View File

@@ -40,7 +40,8 @@ if [[ "$(node --version)" != "v8.9.3" ]]; then
fi
box_version=$(cd "${SOURCE_DIR}" && git rev-parse "HEAD")
webadmin_version=$(cd "${SOURCE_DIR}/../webadmin" && git rev-parse "HEAD")
branch=$(git rev-parse --abbrev-ref HEAD)
webadmin_version=$(cd "${SOURCE_DIR}/../webadmin" && git fetch && git rev-parse "origin/${branch}")
bundle_dir=$(mktemp -d -t box 2>/dev/null || mktemp -d box-XXXXXXXXXX --tmpdir=$TMPDIR)
[[ -z "$bundle_file" ]] && bundle_file="${TMPDIR}/box-${box_version:0:10}-${webadmin_version:0:10}.tar.gz"

View File

@@ -73,7 +73,7 @@ function SetupError(reason, errorOrMessage) {
}
util.inherits(SetupError, Error);
SetupError.BAD_FIELD = 'Field error';
SetupError.BAD_STATE = 'Field error';
SetupError.BAD_STATE = 'Bad State';
SetupError.ALREADY_SETUP = 'Already Setup';
SetupError.INTERNAL_ERROR = 'Internal Error';
SetupError.EXTERNAL_ERROR = 'External Error';
@@ -184,6 +184,8 @@ function dnsSetup(adminFqdn, domain, zoneName, provider, dnsConfig, tlsConfig, c
if (config.adminDomain()) return callback(new SetupError(SetupError.ALREADY_SETUP));
if (gWebadminStatus.configuring || gWebadminStatus.restoring) return callback(new SetupError(SetupError.BAD_STATE, 'Already restoring or configuring'));
if (!zoneName) zoneName = tld.getDomain(domain) || domain;
debug('dnsSetup: Setting up Cloudron with domain %s and zone %s', domain, zoneName);
@@ -291,6 +293,8 @@ function restore(backupConfig, backupId, version, callback) {
if (!semver.valid(version)) return callback(new SetupError(SetupError.BAD_STATE, 'version is not a valid semver'));
if (semver.major(config.version()) !== semver.major(version) || semver.minor(config.version()) !== semver.minor(version)) return callback(new SetupError(SetupError.BAD_STATE, `Run cloudron-setup with --version ${version} to restore from this backup`));
if (gWebadminStatus.configuring || gWebadminStatus.restoring) return callback(new SetupError(SetupError.BAD_STATE, 'Already restoring or configuring'));
user.count(function (error, count) {
if (error) return callback(new SetupError(SetupError.INTERNAL_ERROR, error));
if (count) return callback(new SetupError(SetupError.ALREADY_PROVISIONED, 'Already activated'));