{"action":"closed","issue":{"url":"https://api.github.com/repos/DMOJ/site/issues/707","repository_url":"https://api.github.com/repos/DMOJ/site","labels_url":"https://api.github.com/repos/DMOJ/site/issues/707/labels{/name}","comments_url":"https://api.github.com/repos/DMOJ/site/issues/707/comments","events_url":"https://api.github.com/repos/DMOJ/site/issues/707/events","html_url":"https://github.com/DMOJ/site/issues/707","id":363393597,"node_id":"MDU6SXNzdWUzNjMzOTM1OTc=","number":707,"title":"Only show comments from contests user has access to","user":{"login":"Xyene","id":1403503,"node_id":"MDQ6VXNlcjE0MDM1MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1403503?v=4","gravatar_id":"","url":"https://api.github.com/users/Xyene","html_url":"https://github.com/Xyene","followers_url":"https://api.github.com/users/Xyene/followers","following_url":"https://api.github.com/users/Xyene/following{/other_user}","gists_url":"https://api.github.com/users/Xyene/gists{/gist_id}","starred_url":"https://api.github.com/users/Xyene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xyene/subscriptions","organizations_url":"https://api.github.com/users/Xyene/orgs","repos_url":"https://api.github.com/users/Xyene/repos","events_url":"https://api.github.com/users/Xyene/events{/privacy}","received_events_url":"https://api.github.com/users/Xyene/received_events","type":"User","site_admin":false},"labels":[{"id":186945536,"node_id":"MDU6TGFiZWwxODY5NDU1MzY=","url":"https://api.github.com/repos/DMOJ/site/labels/contest","name":"contest","color":"fbca04","default":false},{"id":85692033,"node_id":"MDU6TGFiZWw4NTY5MjAzMw==","url":"https://api.github.com/repos/DMOJ/site/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":752064085,"node_id":"MDU6TGFiZWw3NTIwNjQwODU=","url":"https://api.github.com/repos/DMOJ/site/labels/good%20first%20issue","name":"good first issue","color":"38c188","default":true},{"id":762730961,"node_id":"MDU6TGFiZWw3NjI3MzA5NjE=","url":"https://api.github.com/repos/DMOJ/site/labels/high%20priority","name":"high priority","color":"e54c14","default":false},{"id":262651992,"node_id":"MDU6TGFiZWwyNjI2NTE5OTI=","url":"https://api.github.com/repos/DMOJ/site/labels/security","name":"security","color":"000000","default":false},{"id":186944591,"node_id":"MDU6TGFiZWwxODY5NDQ1OTE=","url":"https://api.github.com/repos/DMOJ/site/labels/ui","name":"ui","color":"fad8c7","default":false}],"state":"closed","locked":false,"assignee":{"login":"kiritofeng","id":15059063,"node_id":"MDQ6VXNlcjE1MDU5MDYz","avatar_url":"https://avatars0.githubusercontent.com/u/15059063?v=4","gravatar_id":"","url":"https://api.github.com/users/kiritofeng","html_url":"https://github.com/kiritofeng","followers_url":"https://api.github.com/users/kiritofeng/followers","following_url":"https://api.github.com/users/kiritofeng/following{/other_user}","gists_url":"https://api.github.com/users/kiritofeng/gists{/gist_id}","starred_url":"https://api.github.com/users/kiritofeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiritofeng/subscriptions","organizations_url":"https://api.github.com/users/kiritofeng/orgs","repos_url":"https://api.github.com/users/kiritofeng/repos","events_url":"https://api.github.com/users/kiritofeng/events{/privacy}","received_events_url":"https://api.github.com/users/kiritofeng/received_events","type":"User","site_admin":false},"assignees":[{"login":"kiritofeng","id":15059063,"node_id":"MDQ6VXNlcjE1MDU5MDYz","avatar_url":"https://avatars0.githubusercontent.com/u/15059063?v=4","gravatar_id":"","url":"https://api.github.com/users/kiritofeng","html_url":"https://github.com/kiritofeng","followers_url":"https://api.github.com/users/kiritofeng/followers","following_url":"https://api.github.com/users/kiritofeng/following{/other_user}","gists_url":"https://api.github.com/users/kiritofeng/gists{/gist_id}","starred_url":"https://api.github.com/users/kiritofeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiritofeng/subscriptions","organizations_url":"https://api.github.com/users/kiritofeng/orgs","repos_url":"https://api.github.com/users/kiritofeng/repos","events_url":"https://api.github.com/users/kiritofeng/events{/privacy}","received_events_url":"https://api.github.com/users/kiritofeng/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-09-25T03:10:04Z","updated_at":"2018-09-27T06:01:48Z","closed_at":"2018-09-27T06:01:47Z","author_association":"MEMBER","body":"Fairly trivial change at https://github.com/DMOJ/site/blob/bc180f79b90d1bd5235216b8f9904ea22947b509/judge/models/comment.py#L69\r\n\r\nWith the advent of very frequent private contests, this has become more necessary than before.\r\n\r\nMay want to add a `Contest.is_accessible_by` method like we have for `Problem.is_accessible_by`, and use that. Can probably refactor the logic around https://github.com/DMOJ/site/blob/044bcd1fc431c87ff9964d90ec6a207641f013e7/judge/views/contests.py#L40\r\n\r\n...moving the visibility check into `Contest.is_accessible_by`, and relying on it in the current `_find_contest`."}}
{"actor":{"display_login":"quantum5"}}