{"action":"created","comment":{"url":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/comments/239112687","pull_request_review_id":181816064,"id":239112687,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTExMjY4Nw==","diff_hunk":"@@ -45,13 +49,18 @@ public function createAction(Request $request)\n     /**\n      * @Route(\"/tasks/{id}/edit\", name=\"task_edit\")\n      */\n-    public function editAction(Task $task, Request $request)\n+    public function edit(Task $task, Request $request)\n     {\n-        $form = $this->createForm(TaskType::class, $task);\n+\n+        $form = $this->createForm(TaskEditType::class, $task);\n \n         $form->handleRequest($request);\n \n-        if ($form->isValid()) {\n+        if ($form->isSubmitted() && $form->isValid()) {\n+\n+            // Only task author can edit his task. Users with ROLE_ADMIN can edit all tasks.\n+            $this->denyAccessUnlessGranted('edit', $task, \"Désolé, seul les auteurs de leur tâches peuvent les modifier.\");","path":"src/Controller/TaskController.php","position":53,"original_position":53,"commit_id":"13dd2cd67285561626f51db6d5a7faf77b030986","original_commit_id":"13dd2cd67285561626f51db6d5a7faf77b030986","user":{"login":"olix21","id":3217330,"node_id":"MDQ6VXNlcjMyMTczMzA=","avatar_url":"https://avatars2.githubusercontent.com/u/3217330?v=4","gravatar_id":"","url":"https://api.github.com/users/olix21","html_url":"https://github.com/olix21","followers_url":"https://api.github.com/users/olix21/followers","following_url":"https://api.github.com/users/olix21/following{/other_user}","gists_url":"https://api.github.com/users/olix21/gists{/gist_id}","starred_url":"https://api.github.com/users/olix21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olix21/subscriptions","organizations_url":"https://api.github.com/users/olix21/orgs","repos_url":"https://api.github.com/users/olix21/repos","events_url":"https://api.github.com/users/olix21/events{/privacy}","received_events_url":"https://api.github.com/users/olix21/received_events","type":"User","site_admin":false},"body":"> Désolé, seulS les auteurs de leurS tâches\r\n\r\nMais dans ce cas-ci, ça serait plutôt\r\n\r\n> Désolé, seul l'auteurs d'une tâche peut la modifier","created_at":"2018-12-05T15:30:15Z","updated_at":"2018-12-05T15:30:15Z","html_url":"https://github.com/ffouillet/Todo-Co/pull/13#discussion_r239112687","pull_request_url":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/13","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/comments/239112687"},"html":{"href":"https://github.com/ffouillet/Todo-Co/pull/13#discussion_r239112687"},"pull_request":{"href":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/13","id":231913109,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxOTEzMTA5","html_url":"https://github.com/ffouillet/Todo-Co/pull/13","diff_url":"https://github.com/ffouillet/Todo-Co/pull/13.diff","patch_url":"https://github.com/ffouillet/Todo-Co/pull/13.patch","issue_url":"https://api.github.com/repos/ffouillet/Todo-Co/issues/13","number":13,"state":"open","locked":false,"title":"Added authorizations requirements for users and tasks","user":{"login":"ffouillet","id":35224226,"node_id":"MDQ6VXNlcjM1MjI0MjI2","avatar_url":"https://avatars1.githubusercontent.com/u/35224226?v=4","gravatar_id":"","url":"https://api.github.com/users/ffouillet","html_url":"https://github.com/ffouillet","followers_url":"https://api.github.com/users/ffouillet/followers","following_url":"https://api.github.com/users/ffouillet/following{/other_user}","gists_url":"https://api.github.com/users/ffouillet/gists{/gist_id}","starred_url":"https://api.github.com/users/ffouillet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffouillet/subscriptions","organizations_url":"https://api.github.com/users/ffouillet/orgs","repos_url":"https://api.github.com/users/ffouillet/repos","events_url":"https://api.github.com/users/ffouillet/events{/privacy}","received_events_url":"https://api.github.com/users/ffouillet/received_events","type":"User","site_admin":false},"body":"- Only users with role ROLE_ADMIN should be able to access users management actions (create, delete)\r\n- Tasks should be deleted only by their authors.\r\n- Tasks without an author should only be deleted by users with role ROLE_ADMIN\r\n\r\nThis branch have been created on top of \"dev_add_user_roles\" branch.\r\n","created_at":"2018-11-19T10:00:39Z","updated_at":"2018-12-05T15:30:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25d06a3ebe5d576c7b3775040547f2b7737b9487","assignee":{"login":"ffouillet","id":35224226,"node_id":"MDQ6VXNlcjM1MjI0MjI2","avatar_url":"https://avatars1.githubusercontent.com/u/35224226?v=4","gravatar_id":"","url":"https://api.github.com/users/ffouillet","html_url":"https://github.com/ffouillet","followers_url":"https://api.github.com/users/ffouillet/followers","following_url":"https://api.github.com/users/ffouillet/following{/other_user}","gists_url":"https://api.github.com/users/ffouillet/gists{/gist_id}","starred_url":"https://api.github.com/users/ffouillet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffouillet/subscriptions","organizations_url":"https://api.github.com/users/ffouillet/orgs","repos_url":"https://api.github.com/users/ffouillet/repos","events_url":"https://api.github.com/users/ffouillet/events{/privacy}","received_events_url":"https://api.github.com/users/ffouillet/received_events","type":"User","site_admin":false},"assignees":[{"login":"ffouillet","id":35224226,"node_id":"MDQ6VXNlcjM1MjI0MjI2","avatar_url":"https://avatars1.githubusercontent.com/u/35224226?v=4","gravatar_id":"","url":"https://api.github.com/users/ffouillet","html_url":"https://github.com/ffouillet","followers_url":"https://api.github.com/users/ffouillet/followers","following_url":"https://api.github.com/users/ffouillet/following{/other_user}","gists_url":"https://api.github.com/users/ffouillet/gists{/gist_id}","starred_url":"https://api.github.com/users/ffouillet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffouillet/subscriptions","organizations_url":"https://api.github.com/users/ffouillet/orgs","repos_url":"https://api.github.com/users/ffouillet/repos","events_url":"https://api.github.com/users/ffouillet/events{/privacy}","received_events_url":"https://api.github.com/users/ffouillet/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1128444603,"node_id":"MDU6TGFiZWwxMTI4NDQ0NjAz","url":"https://api.github.com/repos/ffouillet/Todo-Co/labels/bug","name":"bug","color":"d73a4a","default":true},{"id":1128444605,"node_id":"MDU6TGFiZWwxMTI4NDQ0NjA1","url":"https://api.github.com/repos/ffouillet/Todo-Co/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/13/commits","review_comments_url":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/13/comments","review_comment_url":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ffouillet/Todo-Co/issues/13/comments","statuses_url":"https://api.github.com/repos/ffouillet/Todo-Co/statuses/13dd2cd67285561626f51db6d5a7faf77b030986","head":{"label":"ffouillet:dev_add_authorizations_requirements","ref":"dev_add_authorizations_requirements","sha":"13dd2cd67285561626f51db6d5a7faf77b030986","user":{"login":"ffouillet","id":35224226,"node_id":"MDQ6VXNlcjM1MjI0MjI2","avatar_url":"https://avatars1.githubusercontent.com/u/35224226?v=4","gravatar_id":"","url":"https://api.github.com/users/ffouillet","html_url":"https://github.com/ffouillet","followers_url":"https://api.github.com/users/ffouillet/followers","following_url":"https://api.github.com/users/ffouillet/following{/other_user}","gists_url":"https://api.github.com/users/ffouillet/gists{/gist_id}","starred_url":"https://api.github.com/users/ffouillet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffouillet/subscriptions","organizations_url":"https://api.github.com/users/ffouillet/orgs","repos_url":"https://api.github.com/users/ffouillet/repos","events_url":"https://api.github.com/users/ffouillet/events{/privacy}","received_events_url":"https://api.github.com/users/ffouillet/received_events","type":"User","site_admin":false},"repo":{"id":157678626,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc2Nzg2MjY=","name":"Todo-Co","full_name":"ffouillet/Todo-Co","private":false,"owner":{"login":"ffouillet","id":35224226,"node_id":"MDQ6VXNlcjM1MjI0MjI2","avatar_url":"https://avatars1.githubusercontent.com/u/35224226?v=4","gravatar_id":"","url":"https://api.github.com/users/ffouillet","html_url":"https://github.com/ffouillet","followers_url":"https://api.github.com/users/ffouillet/followers","following_url":"https://api.github.com/users/ffouillet/following{/other_user}","gists_url":"https://api.github.com/users/ffouillet/gists{/gist_id}","starred_url":"https://api.github.com/users/ffouillet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffouillet/subscriptions","organizations_url":"https://api.github.com/users/ffouillet/orgs","repos_url":"https://api.github.com/users/ffouillet/repos","events_url":"https://api.github.com/users/ffouillet/events{/privacy}","received_events_url":"https://api.github.com/users/ffouillet/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ffouillet/Todo-Co","description":"Symfony Todo application improvement","fork":false,"url":"https://api.github.com/repos/ffouillet/Todo-Co","forks_url":"https://api.github.com/repos/ffouillet/Todo-Co/forks","keys_url":"https://api.github.com/repos/ffouillet/Todo-Co/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ffouillet/Todo-Co/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ffouillet/Todo-Co/teams","hooks_url":"https://api.github.com/repos/ffouillet/Todo-Co/hooks","issue_events_url":"https://api.github.com/repos/ffouillet/Todo-Co/issues/events{/number}","events_url":"https://api.github.com/repos/ffouillet/Todo-Co/events","assignees_url":"https://api.github.com/repos/ffouillet/Todo-Co/assignees{/user}","branches_url":"https://api.github.com/repos/ffouillet/Todo-Co/branches{/branch}","tags_url":"https://api.github.com/repos/ffouillet/Todo-Co/tags","blobs_url":"https://api.github.com/repos/ffouillet/Todo-Co/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ffouillet/Todo-Co/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ffouillet/Todo-Co/git/refs{/sha}","trees_url":"https://api.github.com/repos/ffouillet/Todo-Co/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ffouillet/Todo-Co/statuses/{sha}","languages_url":"https://api.github.com/repos/ffouillet/Todo-Co/languages","stargazers_url":"https://api.github.com/repos/ffouillet/Todo-Co/stargazers","contributors_url":"https://api.github.com/repos/ffouillet/Todo-Co/contributors","subscribers_url":"https://api.github.com/repos/ffouillet/Todo-Co/subscribers","subscription_url":"https://api.github.com/repos/ffouillet/Todo-Co/subscription","commits_url":"https://api.github.com/repos/ffouillet/Todo-Co/commits{/sha}","git_commits_url":"https://api.github.com/repos/ffouillet/Todo-Co/git/commits{/sha}","comments_url":"https://api.github.com/repos/ffouillet/Todo-Co/comments{/number}","issue_comment_url":"https://api.github.com/repos/ffouillet/Todo-Co/issues/comments{/number}","contents_url":"https://api.github.com/repos/ffouillet/Todo-Co/contents/{+path}","compare_url":"https://api.github.com/repos/ffouillet/Todo-Co/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ffouillet/Todo-Co/merges","archive_url":"https://api.github.com/repos/ffouillet/Todo-Co/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ffouillet/Todo-Co/downloads","issues_url":"https://api.github.com/repos/ffouillet/Todo-Co/issues{/number}","pulls_url":"https://api.github.com/repos/ffouillet/Todo-Co/pulls{/number}","milestones_url":"https://api.github.com/repos/ffouillet/Todo-Co/milestones{/number}","notifications_url":"https://api.github.com/repos/ffouillet/Todo-Co/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ffouillet/Todo-Co/labels{/name}","releases_url":"https://api.github.com/repos/ffouillet/Todo-Co/releases{/id}","deployments_url":"https://api.github.com/repos/ffouillet/Todo-Co/deployments","created_at":"2018-11-15T08:37:16Z","updated_at":"2018-12-04T08:01:56Z","pushed_at":"2018-12-05T15:17:35Z","git_url":"git://github.com/ffouillet/Todo-Co.git","ssh_url":"git@github.com:ffouillet/Todo-Co.git","clone_url":"https://github.com/ffouillet/Todo-Co.git","svn_url":"https://github.com/ffouillet/Todo-Co","homepage":"","size":1862,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":14,"license":null,"forks":0,"open_issues":14,"watchers":0,"default_branch":"master"}},"base":{"label":"ffouillet:master","ref":"master","sha":"05d152bfdc242a7d963fcb3a15dfb8f644d07af8","user":{"login":"ffouillet","id":35224226,"node_id":"MDQ6VXNlcjM1MjI0MjI2","avatar_url":"https://avatars1.githubusercontent.com/u/35224226?v=4","gravatar_id":"","url":"https://api.github.com/users/ffouillet","html_url":"https://github.com/ffouillet","followers_url":"https://api.github.com/users/ffouillet/followers","following_url":"https://api.github.com/users/ffouillet/following{/other_user}","gists_url":"https://api.github.com/users/ffouillet/gists{/gist_id}","starred_url":"https://api.github.com/users/ffouillet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffouillet/subscriptions","organizations_url":"https://api.github.com/users/ffouillet/orgs","repos_url":"https://api.github.com/users/ffouillet/repos","events_url":"https://api.github.com/users/ffouillet/events{/privacy}","received_events_url":"https://api.github.com/users/ffouillet/received_events","type":"User","site_admin":false},"repo":{"id":157678626,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc2Nzg2MjY=","name":"Todo-Co","full_name":"ffouillet/Todo-Co","private":false,"owner":{"login":"ffouillet","id":35224226,"node_id":"MDQ6VXNlcjM1MjI0MjI2","avatar_url":"https://avatars1.githubusercontent.com/u/35224226?v=4","gravatar_id":"","url":"https://api.github.com/users/ffouillet","html_url":"https://github.com/ffouillet","followers_url":"https://api.github.com/users/ffouillet/followers","following_url":"https://api.github.com/users/ffouillet/following{/other_user}","gists_url":"https://api.github.com/users/ffouillet/gists{/gist_id}","starred_url":"https://api.github.com/users/ffouillet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffouillet/subscriptions","organizations_url":"https://api.github.com/users/ffouillet/orgs","repos_url":"https://api.github.com/users/ffouillet/repos","events_url":"https://api.github.com/users/ffouillet/events{/privacy}","received_events_url":"https://api.github.com/users/ffouillet/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ffouillet/Todo-Co","description":"Symfony Todo application improvement","fork":false,"url":"https://api.github.com/repos/ffouillet/Todo-Co","forks_url":"https://api.github.com/repos/ffouillet/Todo-Co/forks","keys_url":"https://api.github.com/repos/ffouillet/Todo-Co/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ffouillet/Todo-Co/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ffouillet/Todo-Co/teams","hooks_url":"https://api.github.com/repos/ffouillet/Todo-Co/hooks","issue_events_url":"https://api.github.com/repos/ffouillet/Todo-Co/issues/events{/number}","events_url":"https://api.github.com/repos/ffouillet/Todo-Co/events","assignees_url":"https://api.github.com/repos/ffouillet/Todo-Co/assignees{/user}","branches_url":"https://api.github.com/repos/ffouillet/Todo-Co/branches{/branch}","tags_url":"https://api.github.com/repos/ffouillet/Todo-Co/tags","blobs_url":"https://api.github.com/repos/ffouillet/Todo-Co/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ffouillet/Todo-Co/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ffouillet/Todo-Co/git/refs{/sha}","trees_url":"https://api.github.com/repos/ffouillet/Todo-Co/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ffouillet/Todo-Co/statuses/{sha}","languages_url":"https://api.github.com/repos/ffouillet/Todo-Co/languages","stargazers_url":"https://api.github.com/repos/ffouillet/Todo-Co/stargazers","contributors_url":"https://api.github.com/repos/ffouillet/Todo-Co/contributors","subscribers_url":"https://api.github.com/repos/ffouillet/Todo-Co/subscribers","subscription_url":"https://api.github.com/repos/ffouillet/Todo-Co/subscription","commits_url":"https://api.github.com/repos/ffouillet/Todo-Co/commits{/sha}","git_commits_url":"https://api.github.com/repos/ffouillet/Todo-Co/git/commits{/sha}","comments_url":"https://api.github.com/repos/ffouillet/Todo-Co/comments{/number}","issue_comment_url":"https://api.github.com/repos/ffouillet/Todo-Co/issues/comments{/number}","contents_url":"https://api.github.com/repos/ffouillet/Todo-Co/contents/{+path}","compare_url":"https://api.github.com/repos/ffouillet/Todo-Co/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ffouillet/Todo-Co/merges","archive_url":"https://api.github.com/repos/ffouillet/Todo-Co/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ffouillet/Todo-Co/downloads","issues_url":"https://api.github.com/repos/ffouillet/Todo-Co/issues{/number}","pulls_url":"https://api.github.com/repos/ffouillet/Todo-Co/pulls{/number}","milestones_url":"https://api.github.com/repos/ffouillet/Todo-Co/milestones{/number}","notifications_url":"https://api.github.com/repos/ffouillet/Todo-Co/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ffouillet/Todo-Co/labels{/name}","releases_url":"https://api.github.com/repos/ffouillet/Todo-Co/releases{/id}","deployments_url":"https://api.github.com/repos/ffouillet/Todo-Co/deployments","created_at":"2018-11-15T08:37:16Z","updated_at":"2018-12-04T08:01:56Z","pushed_at":"2018-12-05T15:17:35Z","git_url":"git://github.com/ffouillet/Todo-Co.git","ssh_url":"git@github.com:ffouillet/Todo-Co.git","clone_url":"https://github.com/ffouillet/Todo-Co.git","svn_url":"https://github.com/ffouillet/Todo-Co","homepage":"","size":1862,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":14,"license":null,"forks":0,"open_issues":14,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/13"},"html":{"href":"https://github.com/ffouillet/Todo-Co/pull/13"},"issue":{"href":"https://api.github.com/repos/ffouillet/Todo-Co/issues/13"},"comments":{"href":"https://api.github.com/repos/ffouillet/Todo-Co/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ffouillet/Todo-Co/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/ffouillet/Todo-Co/statuses/13dd2cd67285561626f51db6d5a7faf77b030986"}},"author_association":"OWNER"}}
{"actor":{"display_login":"olix21"}}