{"action":"created","comment":{"url":"https://api.github.com/repos/incuna/incuna-groups/pulls/comments/27465380","id":27465380,"diff_hunk":"@@ -94,3 +109,29 @@ def get_absolute_url(self):\n         \"\"\"Return a permalink that'll scroll to this comment on the page.\"\"\"\n         url = reverse('discussion-thread', kwargs={'pk': self.discussion.pk})\n         return url + self.get_pagejump()\n+\n+    def may_be_deleted(self, user):","path":"groups/models.py","position":38,"original_position":38,"commit_id":"0a0bf2b8fc4afc7ebdb9ce012e54d4ade9f1168c","original_commit_id":"0a0bf2b8fc4afc7ebdb9ce012e54d4ade9f1168c","user":{"login":"meshy","id":767671,"avatar_url":"https://avatars.githubusercontent.com/u/767671?v=3","gravatar_id":"","url":"https://api.github.com/users/meshy","html_url":"https://github.com/meshy","followers_url":"https://api.github.com/users/meshy/followers","following_url":"https://api.github.com/users/meshy/following{/other_user}","gists_url":"https://api.github.com/users/meshy/gists{/gist_id}","starred_url":"https://api.github.com/users/meshy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meshy/subscriptions","organizations_url":"https://api.github.com/users/meshy/orgs","repos_url":"https://api.github.com/users/meshy/repos","events_url":"https://api.github.com/users/meshy/events{/privacy}","received_events_url":"https://api.github.com/users/meshy/received_events","type":"User","site_admin":false},"body":"`can_delete` would be more standard.","created_at":"2015-03-31T09:46:12Z","updated_at":"2015-03-31T09:46:12Z","html_url":"https://github.com/incuna/incuna-groups/pull/5#discussion_r27465380","pull_request_url":"https://api.github.com/repos/incuna/incuna-groups/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/incuna/incuna-groups/pulls/comments/27465380"},"html":{"href":"https://github.com/incuna/incuna-groups/pull/5#discussion_r27465380"},"pull_request":{"href":"https://api.github.com/repos/incuna/incuna-groups/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/incuna/incuna-groups/pulls/5","id":32305231,"html_url":"https://github.com/incuna/incuna-groups/pull/5","diff_url":"https://github.com/incuna/incuna-groups/pull/5.diff","patch_url":"https://github.com/incuna/incuna-groups/pull/5.patch","issue_url":"https://api.github.com/repos/incuna/incuna-groups/issues/5","number":5,"state":"open","locked":false,"title":"Add the ability to delete comments","user":{"login":"adam-incuna","id":6973481,"avatar_url":"https://avatars.githubusercontent.com/u/6973481?v=3","gravatar_id":"","url":"https://api.github.com/users/adam-incuna","html_url":"https://github.com/adam-incuna","followers_url":"https://api.github.com/users/adam-incuna/followers","following_url":"https://api.github.com/users/adam-incuna/following{/other_user}","gists_url":"https://api.github.com/users/adam-incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/adam-incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adam-incuna/subscriptions","organizations_url":"https://api.github.com/users/adam-incuna/orgs","repos_url":"https://api.github.com/users/adam-incuna/repos","events_url":"https://api.github.com/users/adam-incuna/events{/privacy}","received_events_url":"https://api.github.com/users/adam-incuna/received_events","type":"User","site_admin":false},"body":"This adds a new view which deletes comments on POST and shows an \"Are you sure?\" form on GET.  It also shows a 'delete this comment' link next to all comments that the logged-in user is able to delete (their own comments, or anyone's if they are an admin; the link is hidden for already-deleted comments).  Deleted posts have their contents replaced by `(Post deleted)`.\r\n\r\n@incuna/backend review please? :)","created_at":"2015-03-31T09:35:43Z","updated_at":"2015-03-31T09:46:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c423a7cf108c1d6ad5de942f0dd11fa0c7867d7","assignee":{"login":"adam-incuna","id":6973481,"avatar_url":"https://avatars.githubusercontent.com/u/6973481?v=3","gravatar_id":"","url":"https://api.github.com/users/adam-incuna","html_url":"https://github.com/adam-incuna","followers_url":"https://api.github.com/users/adam-incuna/followers","following_url":"https://api.github.com/users/adam-incuna/following{/other_user}","gists_url":"https://api.github.com/users/adam-incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/adam-incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adam-incuna/subscriptions","organizations_url":"https://api.github.com/users/adam-incuna/orgs","repos_url":"https://api.github.com/users/adam-incuna/repos","events_url":"https://api.github.com/users/adam-incuna/events{/privacy}","received_events_url":"https://api.github.com/users/adam-incuna/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/incuna/incuna-groups/pulls/5/commits","review_comments_url":"https://api.github.com/repos/incuna/incuna-groups/pulls/5/comments","review_comment_url":"https://api.github.com/repos/incuna/incuna-groups/pulls/comments{/number}","comments_url":"https://api.github.com/repos/incuna/incuna-groups/issues/5/comments","statuses_url":"https://api.github.com/repos/incuna/incuna-groups/statuses/0a0bf2b8fc4afc7ebdb9ce012e54d4ade9f1168c","head":{"label":"incuna:delete-comments","ref":"delete-comments","sha":"0a0bf2b8fc4afc7ebdb9ce012e54d4ade9f1168c","user":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"repo":{"id":32940766,"name":"incuna-groups","full_name":"incuna/incuna-groups","owner":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/incuna/incuna-groups","description":"","fork":false,"url":"https://api.github.com/repos/incuna/incuna-groups","forks_url":"https://api.github.com/repos/incuna/incuna-groups/forks","keys_url":"https://api.github.com/repos/incuna/incuna-groups/keys{/key_id}","collaborators_url":"https://api.github.com/repos/incuna/incuna-groups/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/incuna/incuna-groups/teams","hooks_url":"https://api.github.com/repos/incuna/incuna-groups/hooks","issue_events_url":"https://api.github.com/repos/incuna/incuna-groups/issues/events{/number}","events_url":"https://api.github.com/repos/incuna/incuna-groups/events","assignees_url":"https://api.github.com/repos/incuna/incuna-groups/assignees{/user}","branches_url":"https://api.github.com/repos/incuna/incuna-groups/branches{/branch}","tags_url":"https://api.github.com/repos/incuna/incuna-groups/tags","blobs_url":"https://api.github.com/repos/incuna/incuna-groups/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/incuna/incuna-groups/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/incuna/incuna-groups/git/refs{/sha}","trees_url":"https://api.github.com/repos/incuna/incuna-groups/git/trees{/sha}","statuses_url":"https://api.github.com/repos/incuna/incuna-groups/statuses/{sha}","languages_url":"https://api.github.com/repos/incuna/incuna-groups/languages","stargazers_url":"https://api.github.com/repos/incuna/incuna-groups/stargazers","contributors_url":"https://api.github.com/repos/incuna/incuna-groups/contributors","subscribers_url":"https://api.github.com/repos/incuna/incuna-groups/subscribers","subscription_url":"https://api.github.com/repos/incuna/incuna-groups/subscription","commits_url":"https://api.github.com/repos/incuna/incuna-groups/commits{/sha}","git_commits_url":"https://api.github.com/repos/incuna/incuna-groups/git/commits{/sha}","comments_url":"https://api.github.com/repos/incuna/incuna-groups/comments{/number}","issue_comment_url":"https://api.github.com/repos/incuna/incuna-groups/issues/comments{/number}","contents_url":"https://api.github.com/repos/incuna/incuna-groups/contents/{+path}","compare_url":"https://api.github.com/repos/incuna/incuna-groups/compare/{base}...{head}","merges_url":"https://api.github.com/repos/incuna/incuna-groups/merges","archive_url":"https://api.github.com/repos/incuna/incuna-groups/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/incuna/incuna-groups/downloads","issues_url":"https://api.github.com/repos/incuna/incuna-groups/issues{/number}","pulls_url":"https://api.github.com/repos/incuna/incuna-groups/pulls{/number}","milestones_url":"https://api.github.com/repos/incuna/incuna-groups/milestones{/number}","notifications_url":"https://api.github.com/repos/incuna/incuna-groups/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/incuna/incuna-groups/labels{/name}","releases_url":"https://api.github.com/repos/incuna/incuna-groups/releases{/id}","created_at":"2015-03-26T17:02:36Z","updated_at":"2015-03-30T15:15:10Z","pushed_at":"2015-03-31T09:35:45Z","git_url":"git://github.com/incuna/incuna-groups.git","ssh_url":"git@github.com:incuna/incuna-groups.git","clone_url":"https://github.com/incuna/incuna-groups.git","svn_url":"https://github.com/incuna/incuna-groups","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"incuna:master","ref":"master","sha":"97de5756ab3929b1cd667562a9dc5a347e742521","user":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"repo":{"id":32940766,"name":"incuna-groups","full_name":"incuna/incuna-groups","owner":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/incuna/incuna-groups","description":"","fork":false,"url":"https://api.github.com/repos/incuna/incuna-groups","forks_url":"https://api.github.com/repos/incuna/incuna-groups/forks","keys_url":"https://api.github.com/repos/incuna/incuna-groups/keys{/key_id}","collaborators_url":"https://api.github.com/repos/incuna/incuna-groups/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/incuna/incuna-groups/teams","hooks_url":"https://api.github.com/repos/incuna/incuna-groups/hooks","issue_events_url":"https://api.github.com/repos/incuna/incuna-groups/issues/events{/number}","events_url":"https://api.github.com/repos/incuna/incuna-groups/events","assignees_url":"https://api.github.com/repos/incuna/incuna-groups/assignees{/user}","branches_url":"https://api.github.com/repos/incuna/incuna-groups/branches{/branch}","tags_url":"https://api.github.com/repos/incuna/incuna-groups/tags","blobs_url":"https://api.github.com/repos/incuna/incuna-groups/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/incuna/incuna-groups/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/incuna/incuna-groups/git/refs{/sha}","trees_url":"https://api.github.com/repos/incuna/incuna-groups/git/trees{/sha}","statuses_url":"https://api.github.com/repos/incuna/incuna-groups/statuses/{sha}","languages_url":"https://api.github.com/repos/incuna/incuna-groups/languages","stargazers_url":"https://api.github.com/repos/incuna/incuna-groups/stargazers","contributors_url":"https://api.github.com/repos/incuna/incuna-groups/contributors","subscribers_url":"https://api.github.com/repos/incuna/incuna-groups/subscribers","subscription_url":"https://api.github.com/repos/incuna/incuna-groups/subscription","commits_url":"https://api.github.com/repos/incuna/incuna-groups/commits{/sha}","git_commits_url":"https://api.github.com/repos/incuna/incuna-groups/git/commits{/sha}","comments_url":"https://api.github.com/repos/incuna/incuna-groups/comments{/number}","issue_comment_url":"https://api.github.com/repos/incuna/incuna-groups/issues/comments{/number}","contents_url":"https://api.github.com/repos/incuna/incuna-groups/contents/{+path}","compare_url":"https://api.github.com/repos/incuna/incuna-groups/compare/{base}...{head}","merges_url":"https://api.github.com/repos/incuna/incuna-groups/merges","archive_url":"https://api.github.com/repos/incuna/incuna-groups/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/incuna/incuna-groups/downloads","issues_url":"https://api.github.com/repos/incuna/incuna-groups/issues{/number}","pulls_url":"https://api.github.com/repos/incuna/incuna-groups/pulls{/number}","milestones_url":"https://api.github.com/repos/incuna/incuna-groups/milestones{/number}","notifications_url":"https://api.github.com/repos/incuna/incuna-groups/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/incuna/incuna-groups/labels{/name}","releases_url":"https://api.github.com/repos/incuna/incuna-groups/releases{/id}","created_at":"2015-03-26T17:02:36Z","updated_at":"2015-03-30T15:15:10Z","pushed_at":"2015-03-31T09:35:45Z","git_url":"git://github.com/incuna/incuna-groups.git","ssh_url":"git@github.com:incuna/incuna-groups.git","clone_url":"https://github.com/incuna/incuna-groups.git","svn_url":"https://github.com/incuna/incuna-groups","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/incuna/incuna-groups/pulls/5"},"html":{"href":"https://github.com/incuna/incuna-groups/pull/5"},"issue":{"href":"https://api.github.com/repos/incuna/incuna-groups/issues/5"},"comments":{"href":"https://api.github.com/repos/incuna/incuna-groups/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/incuna/incuna-groups/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/incuna/incuna-groups/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/incuna/incuna-groups/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/incuna/incuna-groups/statuses/0a0bf2b8fc4afc7ebdb9ce012e54d4ade9f1168c"}}}}