{"action":"created","comment":{"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/comments/186416778","pull_request_review_id":117988970,"id":186416778,"diff_hunk":"@@ -20,7 +20,7 @@ const Validator = {\n         let softValidationResult = true;\n \n         if (!!affectedTables && affectedTables.tables) {\n-            if (global.validatePGEntitiesAccess) {\n+            if (global.settings.validatePGEntitiesAccess) {","path":"app/services/pg-entities-access-validator.js","position":5,"original_position":5,"commit_id":"5f8e1d8f53e4787a8aa51c3dab47aaf02be02272","original_commit_id":"5f8e1d8f53e4787a8aa51c3dab47aaf02be02272","user":{"login":"dgaubert","id":1936888,"avatar_url":"https://avatars0.githubusercontent.com/u/1936888?v=4","gravatar_id":"","url":"https://api.github.com/users/dgaubert","html_url":"https://github.com/dgaubert","followers_url":"https://api.github.com/users/dgaubert/followers","following_url":"https://api.github.com/users/dgaubert/following{/other_user}","gists_url":"https://api.github.com/users/dgaubert/gists{/gist_id}","starred_url":"https://api.github.com/users/dgaubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgaubert/subscriptions","organizations_url":"https://api.github.com/users/dgaubert/orgs","repos_url":"https://api.github.com/users/dgaubert/repos","events_url":"https://api.github.com/users/dgaubert/events{/privacy}","received_events_url":"https://api.github.com/users/dgaubert/received_events","type":"User","site_admin":false},"body":"If we don't define this in the configuration it's going to work anyway because `undefined` is a `falsy` value.  However, I'd try to add a default value in case that `validatePGEntitiesAccess` is `undefined` in order to avoid possible breaking changes like https://github.com/CartoDB/CartoDB-SQL-API/issues/484","created_at":"2018-05-07T13:06:56Z","updated_at":"2018-05-07T13:06:57Z","html_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/481#discussion_r186416778","pull_request_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/481","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/comments/186416778"},"html":{"href":"https://github.com/CartoDB/CartoDB-SQL-API/pull/481#discussion_r186416778"},"pull_request":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/481"}}},"pull_request":{"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/481","id":184263927,"html_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/481","diff_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/481.diff","patch_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/481.patch","issue_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/481","number":481,"state":"closed","locked":false,"title":"fix validatePGEntitiesAccess access","user":{"login":"oleurud","id":421145,"avatar_url":"https://avatars3.githubusercontent.com/u/421145?v=4","gravatar_id":"","url":"https://api.github.com/users/oleurud","html_url":"https://github.com/oleurud","followers_url":"https://api.github.com/users/oleurud/followers","following_url":"https://api.github.com/users/oleurud/following{/other_user}","gists_url":"https://api.github.com/users/oleurud/gists{/gist_id}","starred_url":"https://api.github.com/users/oleurud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleurud/subscriptions","organizations_url":"https://api.github.com/users/oleurud/orgs","repos_url":"https://api.github.com/users/oleurud/repos","events_url":"https://api.github.com/users/oleurud/events{/privacy}","received_events_url":"https://api.github.com/users/oleurud/received_events","type":"User","site_admin":false},"body":"I added an error in https://github.com/CartoDB/CartoDB-SQL-API/pull/478\r\n\r\nAs a result, the new validatePGEntitiesAccess is never used (and always works as `false`)","created_at":"2018-04-26T08:34:56Z","updated_at":"2018-05-07T13:06:57Z","closed_at":"2018-04-26T08:59:41Z","merged_at":"2018-04-26T08:59:41Z","merge_commit_sha":"6ad54b284f11eb401f9e187d525caf6f3ec58a03","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/481/commits","review_comments_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/481/comments","review_comment_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/481/comments","statuses_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/statuses/5f8e1d8f53e4787a8aa51c3dab47aaf02be02272","head":{"label":"CartoDB:fix-validatePGEntitiesAccess","ref":"fix-validatePGEntitiesAccess","sha":"5f8e1d8f53e4787a8aa51c3dab47aaf02be02272","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":1994634,"name":"CartoDB-SQL-API","full_name":"CartoDB/CartoDB-SQL-API","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/CartoDB-SQL-API","description":"CartoDB SQL API","fork":false,"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API","forks_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/forks","keys_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/teams","hooks_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/events","assignees_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/tags","blobs_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/languages","stargazers_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/subscription","commits_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/merges","archive_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/downloads","issues_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/deployments","created_at":"2011-07-04T09:35:13Z","updated_at":"2018-05-07T09:11:02Z","pushed_at":"2018-05-07T10:33:56Z","git_url":"git://github.com/CartoDB/CartoDB-SQL-API.git","ssh_url":"git@github.com:CartoDB/CartoDB-SQL-API.git","clone_url":"https://github.com/CartoDB/CartoDB-SQL-API.git","svn_url":"https://github.com/CartoDB/CartoDB-SQL-API","homepage":"","size":6932,"stargazers_count":42,"watchers_count":42,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"archived":false,"open_issues_count":72,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":52,"open_issues":72,"watchers":42,"default_branch":"master"}},"base":{"label":"CartoDB:master","ref":"master","sha":"9325b573e7091c40b075ee69be00f2acdd3e81c4","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":1994634,"name":"CartoDB-SQL-API","full_name":"CartoDB/CartoDB-SQL-API","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/CartoDB-SQL-API","description":"CartoDB SQL API","fork":false,"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API","forks_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/forks","keys_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/teams","hooks_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/events","assignees_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/tags","blobs_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/languages","stargazers_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/subscription","commits_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/merges","archive_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/downloads","issues_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/deployments","created_at":"2011-07-04T09:35:13Z","updated_at":"2018-05-07T09:11:02Z","pushed_at":"2018-05-07T10:33:56Z","git_url":"git://github.com/CartoDB/CartoDB-SQL-API.git","ssh_url":"git@github.com:CartoDB/CartoDB-SQL-API.git","clone_url":"https://github.com/CartoDB/CartoDB-SQL-API.git","svn_url":"https://github.com/CartoDB/CartoDB-SQL-API","homepage":"","size":6932,"stargazers_count":42,"watchers_count":42,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"archived":false,"open_issues_count":72,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":52,"open_issues":72,"watchers":42,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/481"},"html":{"href":"https://github.com/CartoDB/CartoDB-SQL-API/pull/481"},"issue":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/481"},"comments":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/481/comments"},"review_comments":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/481/comments"},"review_comment":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/481/commits"},"statuses":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/statuses/5f8e1d8f53e4787a8aa51c3dab47aaf02be02272"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dgaubert"}}