mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix code not to change settings.adminAuth
This commit is contained in:
parent
c102828a99
commit
716aa74004
@ -40,7 +40,7 @@ function init(runtime) {
|
||||
settings = runtime.settings;
|
||||
log = runtime.log;
|
||||
if (settings.adminAuth) {
|
||||
var mergedAdminAuth = Object.assign(settings.adminAuth, settings.adminAuth.module);
|
||||
var mergedAdminAuth = Object.assign({}, settings.adminAuth, settings.adminAuth.module);
|
||||
Users.init(mergedAdminAuth);
|
||||
Tokens.init(mergedAdminAuth,runtime.storage);
|
||||
strategies.init(runtime);
|
||||
@ -82,7 +82,7 @@ function getToken(req,res,next) {
|
||||
function login(req,res) {
|
||||
var response = {};
|
||||
if (settings.adminAuth) {
|
||||
var mergedAdminAuth = Object.assign(settings.adminAuth, settings.adminAuth.module);
|
||||
var mergedAdminAuth = Object.assign({}, settings.adminAuth, settings.adminAuth.module);
|
||||
if (mergedAdminAuth.type === "credentials") {
|
||||
response = {
|
||||
"type":"credentials",
|
||||
|
Loading…
Reference in New Issue
Block a user