{"action":"created","comment":{"url":"https://api.github.com/repos/api-platform/core/pulls/comments/166201706","pull_request_review_id":94240509,"id":166201706,"diff_hunk":"@@ -81,7 +81,17 @@ public function onKernelRequest(GetResponseEvent $event)\n         $extraVariables['request'] = $request;\n \n         if (!$this->resourceAccessChecker->isGranted($attributes['resource_class'], $isGranted, $extraVariables)) {\n-            throw new AccessDeniedException();\n+            $defaultMessage = 'Access Denied.';\n+\n+            if (isset($attributes['collection_operation_name'])) {\n+                $message = $resourceMetadata->getCollectionOperationAttribute($attributes['collection_operation_name'], 'access_control_message', $defaultMessage, true);\n+            } elseif (isset($attributes['item_operation_name'])) {\n+                $message = $resourceMetadata->getItemOperationAttribute($attributes['item_operation_name'], 'access_control_message', $defaultMessage, true);\n+            } else {\n+                $message = $resourceMetadata->getCollectionOperationAttribute($attributes['subresource_operation_name'], 'access_control_message', $defaultMessage, true);","path":"src/Security/EventListener/DenyAccessListener.php","position":null,"original_position":12,"commit_id":"bdbbf2d499d5a210a08e6c9af11ab86c0b234647","original_commit_id":"2bc2cfb2a3e6536b9e4e7e3e295da22339fe2bef","user":{"login":"norkunas","id":2722872,"avatar_url":"https://avatars3.githubusercontent.com/u/2722872?v=4","gravatar_id":"","url":"https://api.github.com/users/norkunas","html_url":"https://github.com/norkunas","followers_url":"https://api.github.com/users/norkunas/followers","following_url":"https://api.github.com/users/norkunas/following{/other_user}","gists_url":"https://api.github.com/users/norkunas/gists{/gist_id}","starred_url":"https://api.github.com/users/norkunas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norkunas/subscriptions","organizations_url":"https://api.github.com/users/norkunas/orgs","repos_url":"https://api.github.com/users/norkunas/repos","events_url":"https://api.github.com/users/norkunas/events{/privacy}","received_events_url":"https://api.github.com/users/norkunas/received_events","type":"User","site_admin":false},"body":"Updated.","created_at":"2018-02-06T07:00:24Z","updated_at":"2018-02-06T07:00:24Z","html_url":"https://github.com/api-platform/core/pull/1678#discussion_r166201706","pull_request_url":"https://api.github.com/repos/api-platform/core/pulls/1678","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/api-platform/core/pulls/comments/166201706"},"html":{"href":"https://github.com/api-platform/core/pull/1678#discussion_r166201706"},"pull_request":{"href":"https://api.github.com/repos/api-platform/core/pulls/1678"}},"in_reply_to_id":166201191},"pull_request":{"url":"https://api.github.com/repos/api-platform/core/pulls/1678","id":167086524,"html_url":"https://github.com/api-platform/core/pull/1678","diff_url":"https://github.com/api-platform/core/pull/1678.diff","patch_url":"https://github.com/api-platform/core/pull/1678.patch","issue_url":"https://api.github.com/repos/api-platform/core/issues/1678","number":1678,"state":"open","locked":false,"title":"Implement access_control_message attribute","user":{"login":"norkunas","id":2722872,"avatar_url":"https://avatars3.githubusercontent.com/u/2722872?v=4","gravatar_id":"","url":"https://api.github.com/users/norkunas","html_url":"https://github.com/norkunas","followers_url":"https://api.github.com/users/norkunas/followers","following_url":"https://api.github.com/users/norkunas/following{/other_user}","gists_url":"https://api.github.com/users/norkunas/gists{/gist_id}","starred_url":"https://api.github.com/users/norkunas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norkunas/subscriptions","organizations_url":"https://api.github.com/users/norkunas/orgs","repos_url":"https://api.github.com/users/norkunas/repos","events_url":"https://api.github.com/users/norkunas/events{/privacy}","received_events_url":"https://api.github.com/users/norkunas/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | #1677\r\n| License       | MIT\r\n| Doc PR        | none\r\n\r\n\r\n","created_at":"2018-02-05T08:54:20Z","updated_at":"2018-02-06T07:00:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef45b4b6158bcb6cc1805956b2592c5824902c7c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/api-platform/core/pulls/1678/commits","review_comments_url":"https://api.github.com/repos/api-platform/core/pulls/1678/comments","review_comment_url":"https://api.github.com/repos/api-platform/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/api-platform/core/issues/1678/comments","statuses_url":"https://api.github.com/repos/api-platform/core/statuses/bdbbf2d499d5a210a08e6c9af11ab86c0b234647","head":{"label":"norkunas:access-control-message","ref":"access-control-message","sha":"bdbbf2d499d5a210a08e6c9af11ab86c0b234647","user":{"login":"norkunas","id":2722872,"avatar_url":"https://avatars3.githubusercontent.com/u/2722872?v=4","gravatar_id":"","url":"https://api.github.com/users/norkunas","html_url":"https://github.com/norkunas","followers_url":"https://api.github.com/users/norkunas/followers","following_url":"https://api.github.com/users/norkunas/following{/other_user}","gists_url":"https://api.github.com/users/norkunas/gists{/gist_id}","starred_url":"https://api.github.com/users/norkunas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norkunas/subscriptions","organizations_url":"https://api.github.com/users/norkunas/orgs","repos_url":"https://api.github.com/users/norkunas/repos","events_url":"https://api.github.com/users/norkunas/events{/privacy}","received_events_url":"https://api.github.com/users/norkunas/received_events","type":"User","site_admin":false},"repo":{"id":106271127,"name":"core","full_name":"norkunas/core","owner":{"login":"norkunas","id":2722872,"avatar_url":"https://avatars3.githubusercontent.com/u/2722872?v=4","gravatar_id":"","url":"https://api.github.com/users/norkunas","html_url":"https://github.com/norkunas","followers_url":"https://api.github.com/users/norkunas/followers","following_url":"https://api.github.com/users/norkunas/following{/other_user}","gists_url":"https://api.github.com/users/norkunas/gists{/gist_id}","starred_url":"https://api.github.com/users/norkunas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norkunas/subscriptions","organizations_url":"https://api.github.com/users/norkunas/orgs","repos_url":"https://api.github.com/users/norkunas/repos","events_url":"https://api.github.com/users/norkunas/events{/privacy}","received_events_url":"https://api.github.com/users/norkunas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/norkunas/core","description":"The Hypermedia REST API component of API Platform: JSON-LD and Hydra support, works with Symfony too","fork":true,"url":"https://api.github.com/repos/norkunas/core","forks_url":"https://api.github.com/repos/norkunas/core/forks","keys_url":"https://api.github.com/repos/norkunas/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/norkunas/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/norkunas/core/teams","hooks_url":"https://api.github.com/repos/norkunas/core/hooks","issue_events_url":"https://api.github.com/repos/norkunas/core/issues/events{/number}","events_url":"https://api.github.com/repos/norkunas/core/events","assignees_url":"https://api.github.com/repos/norkunas/core/assignees{/user}","branches_url":"https://api.github.com/repos/norkunas/core/branches{/branch}","tags_url":"https://api.github.com/repos/norkunas/core/tags","blobs_url":"https://api.github.com/repos/norkunas/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/norkunas/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/norkunas/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/norkunas/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/norkunas/core/statuses/{sha}","languages_url":"https://api.github.com/repos/norkunas/core/languages","stargazers_url":"https://api.github.com/repos/norkunas/core/stargazers","contributors_url":"https://api.github.com/repos/norkunas/core/contributors","subscribers_url":"https://api.github.com/repos/norkunas/core/subscribers","subscription_url":"https://api.github.com/repos/norkunas/core/subscription","commits_url":"https://api.github.com/repos/norkunas/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/norkunas/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/norkunas/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/norkunas/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/norkunas/core/contents/{+path}","compare_url":"https://api.github.com/repos/norkunas/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/norkunas/core/merges","archive_url":"https://api.github.com/repos/norkunas/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/norkunas/core/downloads","issues_url":"https://api.github.com/repos/norkunas/core/issues{/number}","pulls_url":"https://api.github.com/repos/norkunas/core/pulls{/number}","milestones_url":"https://api.github.com/repos/norkunas/core/milestones{/number}","notifications_url":"https://api.github.com/repos/norkunas/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/norkunas/core/labels{/name}","releases_url":"https://api.github.com/repos/norkunas/core/releases{/id}","deployments_url":"https://api.github.com/repos/norkunas/core/deployments","created_at":"2017-10-09T10:45:32Z","updated_at":"2017-10-09T10:45:35Z","pushed_at":"2018-02-06T06:59:47Z","git_url":"git://github.com/norkunas/core.git","ssh_url":"git@github.com:norkunas/core.git","clone_url":"https://github.com/norkunas/core.git","svn_url":"https://github.com/norkunas/core","homepage":"https://api-platform.com","size":7512,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"api-platform:master","ref":"master","sha":"26f03fad430a12ab51499f65da2e337f4bf2a51f","user":{"login":"api-platform","id":13420081,"avatar_url":"https://avatars3.githubusercontent.com/u/13420081?v=4","gravatar_id":"","url":"https://api.github.com/users/api-platform","html_url":"https://github.com/api-platform","followers_url":"https://api.github.com/users/api-platform/followers","following_url":"https://api.github.com/users/api-platform/following{/other_user}","gists_url":"https://api.github.com/users/api-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/api-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/api-platform/subscriptions","organizations_url":"https://api.github.com/users/api-platform/orgs","repos_url":"https://api.github.com/users/api-platform/repos","events_url":"https://api.github.com/users/api-platform/events{/privacy}","received_events_url":"https://api.github.com/users/api-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":29501260,"name":"core","full_name":"api-platform/core","owner":{"login":"api-platform","id":13420081,"avatar_url":"https://avatars3.githubusercontent.com/u/13420081?v=4","gravatar_id":"","url":"https://api.github.com/users/api-platform","html_url":"https://github.com/api-platform","followers_url":"https://api.github.com/users/api-platform/followers","following_url":"https://api.github.com/users/api-platform/following{/other_user}","gists_url":"https://api.github.com/users/api-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/api-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/api-platform/subscriptions","organizations_url":"https://api.github.com/users/api-platform/orgs","repos_url":"https://api.github.com/users/api-platform/repos","events_url":"https://api.github.com/users/api-platform/events{/privacy}","received_events_url":"https://api.github.com/users/api-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/api-platform/core","description":"The server component of API Platform: hypermedia and GraphQL APIs in minutes","fork":false,"url":"https://api.github.com/repos/api-platform/core","forks_url":"https://api.github.com/repos/api-platform/core/forks","keys_url":"https://api.github.com/repos/api-platform/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/api-platform/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/api-platform/core/teams","hooks_url":"https://api.github.com/repos/api-platform/core/hooks","issue_events_url":"https://api.github.com/repos/api-platform/core/issues/events{/number}","events_url":"https://api.github.com/repos/api-platform/core/events","assignees_url":"https://api.github.com/repos/api-platform/core/assignees{/user}","branches_url":"https://api.github.com/repos/api-platform/core/branches{/branch}","tags_url":"https://api.github.com/repos/api-platform/core/tags","blobs_url":"https://api.github.com/repos/api-platform/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/api-platform/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/api-platform/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/api-platform/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/api-platform/core/statuses/{sha}","languages_url":"https://api.github.com/repos/api-platform/core/languages","stargazers_url":"https://api.github.com/repos/api-platform/core/stargazers","contributors_url":"https://api.github.com/repos/api-platform/core/contributors","subscribers_url":"https://api.github.com/repos/api-platform/core/subscribers","subscription_url":"https://api.github.com/repos/api-platform/core/subscription","commits_url":"https://api.github.com/repos/api-platform/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/api-platform/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/api-platform/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/api-platform/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/api-platform/core/contents/{+path}","compare_url":"https://api.github.com/repos/api-platform/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/api-platform/core/merges","archive_url":"https://api.github.com/repos/api-platform/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/api-platform/core/downloads","issues_url":"https://api.github.com/repos/api-platform/core/issues{/number}","pulls_url":"https://api.github.com/repos/api-platform/core/pulls{/number}","milestones_url":"https://api.github.com/repos/api-platform/core/milestones{/number}","notifications_url":"https://api.github.com/repos/api-platform/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/api-platform/core/labels{/name}","releases_url":"https://api.github.com/repos/api-platform/core/releases{/id}","deployments_url":"https://api.github.com/repos/api-platform/core/deployments","created_at":"2015-01-19T23:05:56Z","updated_at":"2018-02-05T11:01:21Z","pushed_at":"2018-02-06T06:59:50Z","git_url":"git://github.com/api-platform/core.git","ssh_url":"git@github.com:api-platform/core.git","clone_url":"https://github.com/api-platform/core.git","svn_url":"https://github.com/api-platform/core","homepage":"https://api-platform.com","size":7521,"stargazers_count":609,"watchers_count":609,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":203,"mirror_url":null,"archived":false,"open_issues_count":185,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":203,"open_issues":185,"watchers":609,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/api-platform/core/pulls/1678"},"html":{"href":"https://github.com/api-platform/core/pull/1678"},"issue":{"href":"https://api.github.com/repos/api-platform/core/issues/1678"},"comments":{"href":"https://api.github.com/repos/api-platform/core/issues/1678/comments"},"review_comments":{"href":"https://api.github.com/repos/api-platform/core/pulls/1678/comments"},"review_comment":{"href":"https://api.github.com/repos/api-platform/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/api-platform/core/pulls/1678/commits"},"statuses":{"href":"https://api.github.com/repos/api-platform/core/statuses/bdbbf2d499d5a210a08e6c9af11ab86c0b234647"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"norkunas"}}