GitHub PullRequestReviewCommentEvent at 2014-02-12 05:25:52
Repository: galaxy-api
Actor: mattbasta
Payload: {"comment":{"url":"https://api.github.com/repos/cvan/galaxy-api/pulls/comments/9656449","id":9656449,"diff_hunk":"@@ -42,32 +47,55 @@ module.exports = function(server) {\n         var isDev = !!+POST.dev;\n         var isRev = !!+POST.reviewer;\n         var isAdmin = !!+POST.admin || false;\n+        var _user = POST._user;\n \n-        console.log('Attempting permission update:');\n+        var email = auth.verifySSA(_user);\n+        if (!(email)) {\n+            res.json(403, {error: 'bad_user'});\n+            done();\n+            return;\n+        }\n \n-        user.getUserFromID(client, userID, function(err, resp) {\n-            if (err || !resp) {\n+        // Get user who is sending request and make sure it is an admin\n+        user.getUserFromEmail(client, email, function(err, authenticator) {\n+            if (err || !authenticator) {\n                 res.json(500, {error: err || 'db_error'});","path":"views/user/acl.js","position":35,"original_position":35,"commit_id":"2ef455a375e5cca74af2cb788d8cc270ed78c3f9","original_commit_id":"2ef455a375e5cca74af2cb788d8cc270ed78c3f9","user":{"login":"mattbasta","id":279498,"avatar_url":"https://gravatar.com/avatar/88fb40c25ad334d86f189821bbca1c9f?d=https%3A%2F%2Fidenticons.github.com%2F90dd04b6a90c8f0ec9b3dc7d0f079b4b.png&r=x","gravatar_id":"88fb40c25ad334d86f189821bbca1c9f","url":"https://api.github.com/users/mattbasta","html_url":"https://github.com/mattbasta","followers_url":"https://api.github.com/users/mattbasta/followers","following_url":"https://api.github.com/users/mattbasta/following{/other_user}","gists_url":"https://api.github.com/users/mattbasta/gists{/gist_id}","starred_url":"https://api.github.com/users/mattbasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattbasta/subscriptions","organizations_url":"https://api.github.com/users/mattbasta/orgs","repos_url":"https://api.github.com/users/mattbasta/repos","events_url":"https://api.github.com/users/mattbasta/events{/privacy}","received_events_url":"https://api.github.com/users/mattbasta/received_events","type":"User","site_admin":false},"body":"This should just be `'db_error'`; it shouldn't leak `err`","created_at":"2014-02-12T05:25:52Z","updated_at":"2014-02-12T05:25:52Z","html_url":"https://github.com/cvan/galaxy-api/pull/70#discussion_r9656449","pull_request_url":"https://api.github.com/repos/cvan/galaxy-api/pulls/70","_links":{"self":{"href":"https://api.github.com/repos/cvan/galaxy-api/pulls/comments/9656449"},"html":{"href":"https://github.com/cvan/galaxy-api/pull/70#discussion_r9656449"},"pull_request":{"href":"https://api.github.com/repos/cvan/galaxy-api/pulls/70"}}}}