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') {