{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/helios/pulls/comments/41308998","id":41308998,"diff_hunk":"@@ -106,7 +106,16 @@ func (service *authServiceValue) IsUserBlocked(userId, ipAddress string) (bool,\n \t\treturn false, errors\n \t}\n \n-\treturn service.areAnyStringsBlocked(user.Name, ipAddress)\n+\tif user == nil {\n+\t\tlogger.GetLogger().ErrorMap(map[string]interface{}{","path":"service/auth.go","position":15,"original_position":15,"commit_id":"3d20bc86a6ea33c049fd374fcfc718b5348d8e03","original_commit_id":"3d20bc86a6ea33c049fd374fcfc718b5348d8e03","user":{"login":"nmonterroso","id":325800,"avatar_url":"https://avatars.githubusercontent.com/u/325800?v=3","gravatar_id":"","url":"https://api.github.com/users/nmonterroso","html_url":"https://github.com/nmonterroso","followers_url":"https://api.github.com/users/nmonterroso/followers","following_url":"https://api.github.com/users/nmonterroso/following{/other_user}","gists_url":"https://api.github.com/users/nmonterroso/gists{/gist_id}","starred_url":"https://api.github.com/users/nmonterroso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmonterroso/subscriptions","organizations_url":"https://api.github.com/users/nmonterroso/orgs","repos_url":"https://api.github.com/users/nmonterroso/repos","events_url":"https://api.github.com/users/nmonterroso/events{/privacy}","received_events_url":"https://api.github.com/users/nmonterroso/received_events","type":"User","site_admin":false},"body":"In what cases would we fall back to this? It seems like in all current usages are checking for valid users, after the user has been loaded (so they must exist).","created_at":"2015-10-06T19:15:12Z","updated_at":"2015-10-06T19:15:12Z","html_url":"https://github.com/Wikia/helios/pull/128#discussion_r41308998","pull_request_url":"https://api.github.com/repos/Wikia/helios/pulls/128","_links":{"self":{"href":"https://api.github.com/repos/Wikia/helios/pulls/comments/41308998"},"html":{"href":"https://github.com/Wikia/helios/pull/128#discussion_r41308998"},"pull_request":{"href":"https://api.github.com/repos/Wikia/helios/pulls/128"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/helios/pulls/128","id":46696527,"html_url":"https://github.com/Wikia/helios/pull/128","diff_url":"https://github.com/Wikia/helios/pull/128.diff","patch_url":"https://github.com/Wikia/helios/pull/128.patch","issue_url":"https://api.github.com/repos/Wikia/helios/issues/128","number":128,"state":"open","locked":false,"title":"[SERVICES-853] Checking for user/ip block on token validation resource","user":{"login":"ArturKlajnerok","id":1889095,"avatar_url":"https://avatars.githubusercontent.com/u/1889095?v=3","gravatar_id":"","url":"https://api.github.com/users/ArturKlajnerok","html_url":"https://github.com/ArturKlajnerok","followers_url":"https://api.github.com/users/ArturKlajnerok/followers","following_url":"https://api.github.com/users/ArturKlajnerok/following{/other_user}","gists_url":"https://api.github.com/users/ArturKlajnerok/gists{/gist_id}","starred_url":"https://api.github.com/users/ArturKlajnerok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArturKlajnerok/subscriptions","organizations_url":"https://api.github.com/users/ArturKlajnerok/orgs","repos_url":"https://api.github.com/users/ArturKlajnerok/repos","events_url":"https://api.github.com/users/ArturKlajnerok/events{/privacy}","received_events_url":"https://api.github.com/users/ArturKlajnerok/received_events","type":"User","site_admin":false},"body":"Each time token will be validated addition check for username or ip block will be performed. This will be default behavior for `/info` resource and can be turned off with additional param `noblockcheck`. For blocked request `403 Forbidden` will be returned.\r\n\r\n* [x] Check for user/ip block\r\n* [x] Off switch with `noblockcheck` param\r\n* [ ] unit tests and integration tests\r\n\r\n/cc @Wikia/services-team ","created_at":"2015-10-03T01:12:34Z","updated_at":"2015-10-06T19:15:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"868a4e4395e0c14382b073bfb7e687624166f8b9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/helios/pulls/128/commits","review_comments_url":"https://api.github.com/repos/Wikia/helios/pulls/128/comments","review_comment_url":"https://api.github.com/repos/Wikia/helios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/helios/issues/128/comments","statuses_url":"https://api.github.com/repos/Wikia/helios/statuses/3d20bc86a6ea33c049fd374fcfc718b5348d8e03","head":{"label":"Wikia:SERVICES-853-blocked-user-check-on-token-validation","ref":"SERVICES-853-blocked-user-check-on-token-validation","sha":"3d20bc86a6ea33c049fd374fcfc718b5348d8e03","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":26176918,"name":"helios","full_name":"Wikia/helios","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/helios","description":"Provides user authentication and account creation","fork":false,"url":"https://api.github.com/repos/Wikia/helios","forks_url":"https://api.github.com/repos/Wikia/helios/forks","keys_url":"https://api.github.com/repos/Wikia/helios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/helios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/helios/teams","hooks_url":"https://api.github.com/repos/Wikia/helios/hooks","issue_events_url":"https://api.github.com/repos/Wikia/helios/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/helios/events","assignees_url":"https://api.github.com/repos/Wikia/helios/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/helios/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/helios/tags","blobs_url":"https://api.github.com/repos/Wikia/helios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/helios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/helios/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/helios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/helios/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/helios/languages","stargazers_url":"https://api.github.com/repos/Wikia/helios/stargazers","contributors_url":"https://api.github.com/repos/Wikia/helios/contributors","subscribers_url":"https://api.github.com/repos/Wikia/helios/subscribers","subscription_url":"https://api.github.com/repos/Wikia/helios/subscription","commits_url":"https://api.github.com/repos/Wikia/helios/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/helios/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/helios/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/helios/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/helios/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/helios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/helios/merges","archive_url":"https://api.github.com/repos/Wikia/helios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/helios/downloads","issues_url":"https://api.github.com/repos/Wikia/helios/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/helios/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/helios/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/helios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/helios/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/helios/releases{/id}","created_at":"2014-11-04T16:12:05Z","updated_at":"2015-09-04T22:49:33Z","pushed_at":"2015-10-06T18:22:07Z","git_url":"git://github.com/Wikia/helios.git","ssh_url":"git@github.com:Wikia/helios.git","clone_url":"https://github.com/Wikia/helios.git","svn_url":"https://github.com/Wikia/helios","homepage":"","size":3733,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":7,"default_branch":"master"}},"base":{"label":"Wikia:master","ref":"master","sha":"fa744371b95f6e2cc0a8fef56fd6710abbe9c255","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":26176918,"name":"helios","full_name":"Wikia/helios","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/helios","description":"Provides user authentication and account creation","fork":false,"url":"https://api.github.com/repos/Wikia/helios","forks_url":"https://api.github.com/repos/Wikia/helios/forks","keys_url":"https://api.github.com/repos/Wikia/helios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/helios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/helios/teams","hooks_url":"https://api.github.com/repos/Wikia/helios/hooks","issue_events_url":"https://api.github.com/repos/Wikia/helios/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/helios/events","assignees_url":"https://api.github.com/repos/Wikia/helios/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/helios/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/helios/tags","blobs_url":"https://api.github.com/repos/Wikia/helios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/helios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/helios/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/helios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/helios/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/helios/languages","stargazers_url":"https://api.github.com/repos/Wikia/helios/stargazers","contributors_url":"https://api.github.com/repos/Wikia/helios/contributors","subscribers_url":"https://api.github.com/repos/Wikia/helios/subscribers","subscription_url":"https://api.github.com/repos/Wikia/helios/subscription","commits_url":"https://api.github.com/repos/Wikia/helios/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/helios/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/helios/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/helios/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/helios/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/helios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/helios/merges","archive_url":"https://api.github.com/repos/Wikia/helios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/helios/downloads","issues_url":"https://api.github.com/repos/Wikia/helios/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/helios/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/helios/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/helios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/helios/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/helios/releases{/id}","created_at":"2014-11-04T16:12:05Z","updated_at":"2015-09-04T22:49:33Z","pushed_at":"2015-10-06T18:22:07Z","git_url":"git://github.com/Wikia/helios.git","ssh_url":"git@github.com:Wikia/helios.git","clone_url":"https://github.com/Wikia/helios.git","svn_url":"https://github.com/Wikia/helios","homepage":"","size":3733,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/helios/pulls/128"},"html":{"href":"https://github.com/Wikia/helios/pull/128"},"issue":{"href":"https://api.github.com/repos/Wikia/helios/issues/128"},"comments":{"href":"https://api.github.com/repos/Wikia/helios/issues/128/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/helios/pulls/128/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/helios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/helios/pulls/128/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/helios/statuses/3d20bc86a6ea33c049fd374fcfc718b5348d8e03"}}}}