enable public user again
This commit is contained in:
parent
fefa051450
commit
fd58592546
@ -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);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -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'
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user