From c14378ca5df744e1cdc11e11c67971ad792887bf Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 17 Feb 2014 18:20:18 +0100 Subject: [PATCH] Avoid checking for table privacy when not using table maps See #147 --- lib/cartodb/server_options.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index 5518efab..902e1a92 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -558,9 +558,13 @@ module.exports = function(){ } if ( ! signed_by ) { - // request not authorized by signer, continue - // to check map privacy - return null; + // request not authorized by signer, + // continue to check table privacy, + // if table was given + if ( req.params.table ) return null; + // otherwise return no authorization + callback(err, null); + return; } // Authorized by "signed_by" !