{"action":"created","issue":{"url":"https://api.github.com/repos/hypothesis/h/issues/4154","repository_url":"https://api.github.com/repos/hypothesis/h","labels_url":"https://api.github.com/repos/hypothesis/h/issues/4154/labels{/name}","comments_url":"https://api.github.com/repos/hypothesis/h/issues/4154/comments","events_url":"https://api.github.com/repos/hypothesis/h/issues/4154/events","html_url":"https://github.com/hypothesis/h/pull/4154","id":192840141,"number":4154,"title":"Factor group join into separate view","user":{"login":"seanh","id":22498,"avatar_url":"https://avatars.githubusercontent.com/u/22498?v=3","gravatar_id":"","url":"https://api.github.com/users/seanh","html_url":"https://github.com/seanh","followers_url":"https://api.github.com/users/seanh/followers","following_url":"https://api.github.com/users/seanh/following{/other_user}","gists_url":"https://api.github.com/users/seanh/gists{/gist_id}","starred_url":"https://api.github.com/users/seanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanh/subscriptions","organizations_url":"https://api.github.com/users/seanh/orgs","repos_url":"https://api.github.com/users/seanh/repos","events_url":"https://api.github.com/users/seanh/events{/privacy}","received_events_url":"https://api.github.com/users/seanh/received_events","type":"User","site_admin":false},"labels":[{"id":427068869,"url":"https://api.github.com/repos/hypothesis/h/labels/Feature:%20Activity%20Pages","name":"Feature: Activity Pages","color":"5319e7","default":false},{"id":460185610,"url":"https://api.github.com/repos/hypothesis/h/labels/In%20Review","name":"In Review","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"assignees":[{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-12-01T12:59:39Z","updated_at":"2016-12-01T17:44:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hypothesis/h/pulls/4154","html_url":"https://github.com/hypothesis/h/pull/4154","diff_url":"https://github.com/hypothesis/h/pull/4154.diff","patch_url":"https://github.com/hypothesis/h/pull/4154.patch"},"body":"Factor the group join page (the view for the 'group_read' route when the\r\nuser is logged-in but isn't a member of the group) into a separate view\r\ncallable.\r\n\r\nPreviously h.views.groups.read() was called for the 'group_read' route\r\nwhen the user was logged-in, whether they're a member of the group or\r\nnot.\r\n\r\nIn the future the classic group page that this read() view provides is\r\ngoing to be used only when the 'search_page' feature flag is off, and a\r\ncompletely separate view (h.views.activity.GroupSearchController) is\r\ngoing to be used when the flag is on. We'll add a view config predicate\r\nto read() so that it's not called if the flag is on.\r\n\r\nBut we still want the join group page to be called even if the feature\r\nflag is on, so we can't have this read() function (which is not going to\r\nbe called when the flag is on anymore) also being responsible for the\r\njoin page.\r\n\r\nAdditionally there was a separate view function, join(), which was\r\ncalled when the user is logged-in but isn't a member of the group and\r\nPOSTs to the group_read route. It's a little odd that GET requests in\r\nthe \"join group\" scenario (group_read route, logged-in, not a member)\r\nare handled by read() (which also handles the read group scenario)\r\nwhereas POST requests in the join group scenario are handled by a\r\nseparate join() function.\r\n\r\nSo refactor things so that:\r\n\r\n* read() is only for the group read page that you see when you're a\r\n  member of the group\r\n\r\n* The new JoinController is for the join page that you see when you\r\n  aren't a member, and has separate methods for GET and POST to this page\r\n\r\nNote that there's still one more separate view function for this route as\r\nwell, which this commit doesn't touch: read_unauthenticated() (for when you're\r\nnot logged in)."},"comment":{"url":"https://api.github.com/repos/hypothesis/h/issues/comments/264241759","html_url":"https://github.com/hypothesis/h/pull/4154#issuecomment-264241759","issue_url":"https://api.github.com/repos/hypothesis/h/issues/4154","id":264241759,"user":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T17:44:11Z","updated_at":"2016-12-01T17:44:11Z","body":"LGTM"}}
{"actor":{"display_login":"robertknight"}}