enable public user again

This commit is contained in:
Simon Tokumine 2011-08-17 17:32:54 +01:00
parent fefa051450
commit fd58592546
3 changed files with 11 additions and 2 deletions

View File

@ -138,7 +138,7 @@ var oAuth = function(){
},
function checkSignature(err, data){
if (err) callback(err, null);
callback(err, (signature === data) ? ohash.user_id : null);
callback(err, (signature === data && !_.isUndefined(data)) ? ohash.user_id : null);
}
);
}

View File

@ -30,7 +30,6 @@ set :use_sudo, false
default_run_options[:pty] = true
after "deploy", "node:link_directories"
after "deploy", "node:update_dependencies"
# ensures ssh-agent is always running
before 'deploy:setup', 'deploy:create_deploy_to_with_sudo'

View File

@ -199,4 +199,14 @@ tests['returns null user for unverified signatures'] = function(){
}, true)
}
tests['returns null user for no oauth'] = function(){
var req = {query:{},
method: 'GET',
route: {path: '/api/v1/tables'}
}
oAuth.verifyRequest(req, function(err, data){
assert.eql(data, null);
}, true)
}