Skip to content
Snippets Groups Projects
Commit c9036e0d authored by Gomez Goiri, Aitor's avatar Gomez Goiri, Aitor
Browse files

Fixing password reading from environment variable

parent 4be8ebc9
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,8 @@ const ApiClient = require("@traceblock/api-client") ...@@ -7,7 +7,8 @@ const ApiClient = require("@traceblock/api-client")
const usersByOrg = require("./users") const usersByOrg = require("./users")
const readPassword = (user, org) => const readPassword = (user, org) =>
process.env[`PASSWD-${user}-${org}`.toUpperCase()] || "secret" process.env[`PASSWD-${user}-${org.replace(/\./g, "-")}`.toUpperCase()] ||
"secret"
const modifyUser = async ( const modifyUser = async (
apiClient, apiClient,
...@@ -49,7 +50,6 @@ const createOrModifyUserIfNeeded = async ( ...@@ -49,7 +50,6 @@ const createOrModifyUserIfNeeded = async (
`${username}@${organization}` `${username}@${organization}`
) )
} catch (err) { } catch (err) {
console.log("MOD", username, password, organization, role)
return modifyUser(apiClient, username, password, organization, role) return modifyUser(apiClient, username, password, organization, role)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment