From 794ecc6ef6e2aee8920e38aaa6489ce7044b667a Mon Sep 17 00:00:00 2001 From: NGPixel Date: Mon, 7 Sep 2020 14:48:09 -0400 Subject: [PATCH] fix: new install local auth not enabled (#2375) --- server/db/migrations-sqlite/2.5.118.js | 6 ++++++ server/db/migrations/2.5.118.js | 6 ++++++ server/setup.js | 1 + 3 files changed, 13 insertions(+) create mode 100644 server/db/migrations-sqlite/2.5.118.js create mode 100644 server/db/migrations/2.5.118.js diff --git a/server/db/migrations-sqlite/2.5.118.js b/server/db/migrations-sqlite/2.5.118.js new file mode 100644 index 00000000..11c1498e --- /dev/null +++ b/server/db/migrations-sqlite/2.5.118.js @@ -0,0 +1,6 @@ +exports.up = async knex => { + // -> Fix 2.5.117 new installations without isEnabled on local auth (#2382) + await knex('authentication').where('key', 'local').update({ isEnabled: true }) +} + +exports.down = knex => { } diff --git a/server/db/migrations/2.5.118.js b/server/db/migrations/2.5.118.js new file mode 100644 index 00000000..11c1498e --- /dev/null +++ b/server/db/migrations/2.5.118.js @@ -0,0 +1,6 @@ +exports.up = async knex => { + // -> Fix 2.5.117 new installations without isEnabled on local auth (#2382) + await knex('authentication').where('key', 'local').update({ isEnabled: true }) +} + +exports.down = knex => { } diff --git a/server/setup.js b/server/setup.js index fcfa18ad..57daf5ac 100644 --- a/server/setup.js +++ b/server/setup.js @@ -258,6 +258,7 @@ module.exports = () => { key: 'local', config: {}, selfRegistration: false, + isEnabled: true, domainWhitelist: {v: []}, autoEnrollGroups: {v: []}, order: 0,