From 521b441da5e60d96feae59dafba341b96eb547d0 Mon Sep 17 00:00:00 2001 From: Eneko Lakasta Date: Tue, 20 Feb 2018 12:53:33 +0100 Subject: [PATCH] default apikey is returned by metadata module if no apikey found, remove this code because is never going to be run --- lib/cartodb/backends/pg_connection.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/cartodb/backends/pg_connection.js b/lib/cartodb/backends/pg_connection.js index 290fb6ef..d5c75a9c 100644 --- a/lib/cartodb/backends/pg_connection.js +++ b/lib/cartodb/backends/pg_connection.js @@ -53,23 +53,18 @@ PgConnection.prototype.setDBAuth = function(username, params, apikeyType, callba //Remove this block when Auth fallback is not used anymore // AUTH_FALLBACK + // master apikey has been recreated from user's metadata if (!params.dbuser && apikey.user_id && apikey.type === 'master' && global.environment.postgres_auth_user) { params.dbuser = _.template(global.environment.postgres_auth_user, apikey); } //Remove this block when Auth fallback is not used anymore // AUTH_FALLBACK + // default apikey has been recreated from user's metadata if (!params.dbpassword && global.environment.postgres.password) { params.dbpassword = global.environment.postgres.password; } - //Remove this block when Auth fallback is not used anymore - // AUTH_FALLBACK - // If api key not found use default - if (!params.dbuser && !params.dbpassword) { - return this.setDBAuth(username, params, 'default', callback); - } - return callback(); }); } else if (apikeyType === 'default') {