{"action":"created","comment":{"url":"https://api.github.com/repos/apache/falcon/pulls/comments/67550634","id":67550634,"diff_hunk":"@@ -170,7 +171,8 @@ public void authorizeResource(String resource, String action,\n                     authorizeAdminResource(authenticatedUGI, action);\n                 }\n             } else if (\"entities\".equals(resource) || \"instance\".equals(resource)) {\n-                authorizeEntityResource(authenticatedUGI, entityName, entityType, action);\n+                authorizeEntityResource(authenticatedUGI, entityName, entityType, action,\n+                        \"entities\".equals(resource) && LIST_OPERATION.equals(action));","path":"common/src/main/java/org/apache/falcon/security/DefaultAuthorizationProvider.java","position":14,"original_position":14,"commit_id":"7aa034ba07fffaf0cabfbbaed3c41c31f264e7c0","original_commit_id":"7aa034ba07fffaf0cabfbbaed3c41c31f264e7c0","user":{"login":"bvellanki","id":7927462,"avatar_url":"https://avatars.githubusercontent.com/u/7927462?v=3","gravatar_id":"","url":"https://api.github.com/users/bvellanki","html_url":"https://github.com/bvellanki","followers_url":"https://api.github.com/users/bvellanki/followers","following_url":"https://api.github.com/users/bvellanki/following{/other_user}","gists_url":"https://api.github.com/users/bvellanki/gists{/gist_id}","starred_url":"https://api.github.com/users/bvellanki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvellanki/subscriptions","organizations_url":"https://api.github.com/users/bvellanki/orgs","repos_url":"https://api.github.com/users/bvellanki/repos","events_url":"https://api.github.com/users/bvellanki/events{/privacy}","received_events_url":"https://api.github.com/users/bvellanki/received_events","type":"User","site_admin":false},"body":"It is good practice to separate out functional logic from method calls. Have a boolean var that is set to \"entities\".equals(resource) && LIST_OPERATION.equals(action) and then use it in method call.","created_at":"2016-06-17T17:57:09Z","updated_at":"2016-06-17T17:57:09Z","html_url":"https://github.com/apache/falcon/pull/189#discussion_r67550634","pull_request_url":"https://api.github.com/repos/apache/falcon/pulls/189","_links":{"self":{"href":"https://api.github.com/repos/apache/falcon/pulls/comments/67550634"},"html":{"href":"https://github.com/apache/falcon/pull/189#discussion_r67550634"},"pull_request":{"href":"https://api.github.com/repos/apache/falcon/pulls/189"}}},"pull_request":{"url":"https://api.github.com/repos/apache/falcon/pulls/189","id":74280549,"html_url":"https://github.com/apache/falcon/pull/189","diff_url":"https://github.com/apache/falcon/pull/189.diff","patch_url":"https://github.com/apache/falcon/pull/189.patch","issue_url":"https://api.github.com/repos/apache/falcon/issues/189","number":189,"state":"open","locked":false,"title":"FALCON-2035 Entity list operation without type parameter doesn't work when authorization is enabled","user":{"login":"yzheng-hortonworks","id":10202347,"avatar_url":"https://avatars.githubusercontent.com/u/10202347?v=3","gravatar_id":"","url":"https://api.github.com/users/yzheng-hortonworks","html_url":"https://github.com/yzheng-hortonworks","followers_url":"https://api.github.com/users/yzheng-hortonworks/followers","following_url":"https://api.github.com/users/yzheng-hortonworks/following{/other_user}","gists_url":"https://api.github.com/users/yzheng-hortonworks/gists{/gist_id}","starred_url":"https://api.github.com/users/yzheng-hortonworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yzheng-hortonworks/subscriptions","organizations_url":"https://api.github.com/users/yzheng-hortonworks/orgs","repos_url":"https://api.github.com/users/yzheng-hortonworks/repos","events_url":"https://api.github.com/users/yzheng-hortonworks/events{/privacy}","received_events_url":"https://api.github.com/users/yzheng-hortonworks/received_events","type":"User","site_admin":false},"body":"Test entity list operation without type parameter works when authorization is enabled.","created_at":"2016-06-17T17:52:13Z","updated_at":"2016-06-17T17:57:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c59c8a890c2f3b639ae1f8078efb205a017eedcb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/falcon/pulls/189/commits","review_comments_url":"https://api.github.com/repos/apache/falcon/pulls/189/comments","review_comment_url":"https://api.github.com/repos/apache/falcon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/falcon/issues/189/comments","statuses_url":"https://api.github.com/repos/apache/falcon/statuses/7aa034ba07fffaf0cabfbbaed3c41c31f264e7c0","head":{"label":"yzheng-hortonworks:FALCON-2035","ref":"FALCON-2035","sha":"7aa034ba07fffaf0cabfbbaed3c41c31f264e7c0","user":{"login":"yzheng-hortonworks","id":10202347,"avatar_url":"https://avatars.githubusercontent.com/u/10202347?v=3","gravatar_id":"","url":"https://api.github.com/users/yzheng-hortonworks","html_url":"https://github.com/yzheng-hortonworks","followers_url":"https://api.github.com/users/yzheng-hortonworks/followers","following_url":"https://api.github.com/users/yzheng-hortonworks/following{/other_user}","gists_url":"https://api.github.com/users/yzheng-hortonworks/gists{/gist_id}","starred_url":"https://api.github.com/users/yzheng-hortonworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yzheng-hortonworks/subscriptions","organizations_url":"https://api.github.com/users/yzheng-hortonworks/orgs","repos_url":"https://api.github.com/users/yzheng-hortonworks/repos","events_url":"https://api.github.com/users/yzheng-hortonworks/events{/privacy}","received_events_url":"https://api.github.com/users/yzheng-hortonworks/received_events","type":"User","site_admin":false},"repo":{"id":51108322,"name":"falcon","full_name":"yzheng-hortonworks/falcon","owner":{"login":"yzheng-hortonworks","id":10202347,"avatar_url":"https://avatars.githubusercontent.com/u/10202347?v=3","gravatar_id":"","url":"https://api.github.com/users/yzheng-hortonworks","html_url":"https://github.com/yzheng-hortonworks","followers_url":"https://api.github.com/users/yzheng-hortonworks/followers","following_url":"https://api.github.com/users/yzheng-hortonworks/following{/other_user}","gists_url":"https://api.github.com/users/yzheng-hortonworks/gists{/gist_id}","starred_url":"https://api.github.com/users/yzheng-hortonworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yzheng-hortonworks/subscriptions","organizations_url":"https://api.github.com/users/yzheng-hortonworks/orgs","repos_url":"https://api.github.com/users/yzheng-hortonworks/repos","events_url":"https://api.github.com/users/yzheng-hortonworks/events{/privacy}","received_events_url":"https://api.github.com/users/yzheng-hortonworks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yzheng-hortonworks/falcon","description":"Mirror of Apache Falcon","fork":true,"url":"https://api.github.com/repos/yzheng-hortonworks/falcon","forks_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/forks","keys_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/teams","hooks_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/hooks","issue_events_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/issues/events{/number}","events_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/events","assignees_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/assignees{/user}","branches_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/branches{/branch}","tags_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/tags","blobs_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/git/refs{/sha}","trees_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/statuses/{sha}","languages_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/languages","stargazers_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/stargazers","contributors_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/contributors","subscribers_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/subscribers","subscription_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/subscription","commits_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/commits{/sha}","git_commits_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/git/commits{/sha}","comments_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/comments{/number}","issue_comment_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/issues/comments{/number}","contents_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/contents/{+path}","compare_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/merges","archive_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/downloads","issues_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/issues{/number}","pulls_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/pulls{/number}","milestones_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/milestones{/number}","notifications_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/labels{/name}","releases_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/releases{/id}","deployments_url":"https://api.github.com/repos/yzheng-hortonworks/falcon/deployments","created_at":"2016-02-04T21:51:32Z","updated_at":"2016-02-04T21:51:37Z","pushed_at":"2016-06-17T17:51:12Z","git_url":"git://github.com/yzheng-hortonworks/falcon.git","ssh_url":"git@github.com:yzheng-hortonworks/falcon.git","clone_url":"https://github.com/yzheng-hortonworks/falcon.git","svn_url":"https://github.com/yzheng-hortonworks/falcon","homepage":null,"size":29553,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"d66185988ae0aa60768b272759d2312d724976f9","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":11543457,"name":"falcon","full_name":"apache/falcon","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/falcon","description":"Mirror of Apache Falcon","fork":false,"url":"https://api.github.com/repos/apache/falcon","forks_url":"https://api.github.com/repos/apache/falcon/forks","keys_url":"https://api.github.com/repos/apache/falcon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/falcon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/falcon/teams","hooks_url":"https://api.github.com/repos/apache/falcon/hooks","issue_events_url":"https://api.github.com/repos/apache/falcon/issues/events{/number}","events_url":"https://api.github.com/repos/apache/falcon/events","assignees_url":"https://api.github.com/repos/apache/falcon/assignees{/user}","branches_url":"https://api.github.com/repos/apache/falcon/branches{/branch}","tags_url":"https://api.github.com/repos/apache/falcon/tags","blobs_url":"https://api.github.com/repos/apache/falcon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/falcon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/falcon/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/falcon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/falcon/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/falcon/languages","stargazers_url":"https://api.github.com/repos/apache/falcon/stargazers","contributors_url":"https://api.github.com/repos/apache/falcon/contributors","subscribers_url":"https://api.github.com/repos/apache/falcon/subscribers","subscription_url":"https://api.github.com/repos/apache/falcon/subscription","commits_url":"https://api.github.com/repos/apache/falcon/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/falcon/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/falcon/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/falcon/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/falcon/contents/{+path}","compare_url":"https://api.github.com/repos/apache/falcon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/falcon/merges","archive_url":"https://api.github.com/repos/apache/falcon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/falcon/downloads","issues_url":"https://api.github.com/repos/apache/falcon/issues{/number}","pulls_url":"https://api.github.com/repos/apache/falcon/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/falcon/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/falcon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/falcon/labels{/name}","releases_url":"https://api.github.com/repos/apache/falcon/releases{/id}","deployments_url":"https://api.github.com/repos/apache/falcon/deployments","created_at":"2013-07-20T07:00:14Z","updated_at":"2016-04-28T08:29:47Z","pushed_at":"2016-06-17T17:52:13Z","git_url":"git://github.com/apache/falcon.git","ssh_url":"git@github.com:apache/falcon.git","clone_url":"https://github.com/apache/falcon.git","svn_url":"https://github.com/apache/falcon","homepage":null,"size":32144,"stargazers_count":50,"watchers_count":50,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":79,"mirror_url":"git://git.apache.org/falcon.git","open_issues_count":22,"forks":79,"open_issues":22,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/falcon/pulls/189"},"html":{"href":"https://github.com/apache/falcon/pull/189"},"issue":{"href":"https://api.github.com/repos/apache/falcon/issues/189"},"comments":{"href":"https://api.github.com/repos/apache/falcon/issues/189/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/falcon/pulls/189/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/falcon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/falcon/pulls/189/commits"},"statuses":{"href":"https://api.github.com/repos/apache/falcon/statuses/7aa034ba07fffaf0cabfbbaed3c41c31f264e7c0"}}}}
{"actor":{"display_login":"bvellanki"}}