{"action":"closed","number":477,"pull_request":{"url":"https://api.github.com/repos/AusDTO/gov-au-beta/pulls/477","id":83948013,"html_url":"https://github.com/AusDTO/gov-au-beta/pull/477","diff_url":"https://github.com/AusDTO/gov-au-beta/pull/477.diff","patch_url":"https://github.com/AusDTO/gov-au-beta/pull/477.patch","issue_url":"https://api.github.com/repos/AusDTO/gov-au-beta/issues/477","number":477,"state":"closed","locked":false,"title":"SITES-656 redirect authentication failures to /users/sign_in","user":{"login":"freshtonic","id":2769,"avatar_url":"https://avatars.githubusercontent.com/u/2769?v=3","gravatar_id":"","url":"https://api.github.com/users/freshtonic","html_url":"https://github.com/freshtonic","followers_url":"https://api.github.com/users/freshtonic/followers","following_url":"https://api.github.com/users/freshtonic/following{/other_user}","gists_url":"https://api.github.com/users/freshtonic/gists{/gist_id}","starred_url":"https://api.github.com/users/freshtonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freshtonic/subscriptions","organizations_url":"https://api.github.com/users/freshtonic/orgs","repos_url":"https://api.github.com/users/freshtonic/repos","events_url":"https://api.github.com/users/freshtonic/events{/privacy}","received_events_url":"https://api.github.com/users/freshtonic/received_events","type":"User","site_admin":false},"body":"Authentication behaviour is now handled by using the AccessDeniedConcern\r\nin appropriate controllers. This centralises the behaviour for\r\nconsitency. The behaviour is:\r\n\r\n- When a user is not authenticated:\r\n\r\n  If they try to access a page that requires authorisation they will be\r\n  redirected to /users/sign_in\r\n\r\n  If it's a public page the request will succeed\r\n\r\n- When a user is authenticated:\r\n\r\n  If the user is also authorised the request will succeed.\r\n  If they are not authorised the request will fail with a 401.\r\n\r\nThe flash messages are also set by the helper.\r\n\r\nI deleted some of the specs for various controllers that were testing\r\nthe very rudimentary behaviour of how authentication and authorisation\r\nfailures were handled.  The basics are now tested in the spec for the\r\nAccessDeniedConcern itself so I removed the duplication.\r\n","created_at":"2016-09-05T04:08:58Z","updated_at":"2016-09-07T06:58:54Z","closed_at":"2016-09-07T06:58:54Z","merged_at":"2016-09-07T06:58:54Z","merge_commit_sha":"d3697c4726b66942eb8a86316247599df6736eb4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/AusDTO/gov-au-beta/pulls/477/commits","review_comments_url":"https://api.github.com/repos/AusDTO/gov-au-beta/pulls/477/comments","review_comment_url":"https://api.github.com/repos/AusDTO/gov-au-beta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AusDTO/gov-au-beta/issues/477/comments","statuses_url":"https://api.github.com/repos/AusDTO/gov-au-beta/statuses/c7905f83a1ea9d5a274fe50c2daa23500736a116","head":{"label":"AusDTO:fix/redirect-unauthed-to-sign-in","ref":"fix/redirect-unauthed-to-sign-in","sha":"c7905f83a1ea9d5a274fe50c2daa23500736a116","user":{"login":"AusDTO","id":11763427,"avatar_url":"https://avatars.githubusercontent.com/u/11763427?v=3","gravatar_id":"","url":"https://api.github.com/users/AusDTO","html_url":"https://github.com/AusDTO","followers_url":"https://api.github.com/users/AusDTO/followers","following_url":"https://api.github.com/users/AusDTO/following{/other_user}","gists_url":"https://api.github.com/users/AusDTO/gists{/gist_id}","starred_url":"https://api.github.com/users/AusDTO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AusDTO/subscriptions","organizations_url":"https://api.github.com/users/AusDTO/orgs","repos_url":"https://api.github.com/users/AusDTO/repos","events_url":"https://api.github.com/users/AusDTO/events{/privacy}","received_events_url":"https://api.github.com/users/AusDTO/received_events","type":"Organization","site_admin":false},"repo":{"id":57357025,"name":"gov-au-beta","full_name":"AusDTO/gov-au-beta","owner":{"login":"AusDTO","id":11763427,"avatar_url":"https://avatars.githubusercontent.com/u/11763427?v=3","gravatar_id":"","url":"https://api.github.com/users/AusDTO","html_url":"https://github.com/AusDTO","followers_url":"https://api.github.com/users/AusDTO/followers","following_url":"https://api.github.com/users/AusDTO/following{/other_user}","gists_url":"https://api.github.com/users/AusDTO/gists{/gist_id}","starred_url":"https://api.github.com/users/AusDTO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AusDTO/subscriptions","organizations_url":"https://api.github.com/users/AusDTO/orgs","repos_url":"https://api.github.com/users/AusDTO/repos","events_url":"https://api.github.com/users/AusDTO/events{/privacy}","received_events_url":"https://api.github.com/users/AusDTO/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AusDTO/gov-au-beta","description":"User facing frontend to the GOV.AU content site.","fork":false,"url":"https://api.github.com/repos/AusDTO/gov-au-beta","forks_url":"https://api.github.com/repos/AusDTO/gov-au-beta/forks","keys_url":"https://api.github.com/repos/AusDTO/gov-au-beta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AusDTO/gov-au-beta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AusDTO/gov-au-beta/teams","hooks_url":"https://api.github.com/repos/AusDTO/gov-au-beta/hooks","issue_events_url":"https://api.github.com/repos/AusDTO/gov-au-beta/issues/events{/number}","events_url":"https://api.github.com/repos/AusDTO/gov-au-beta/events","assignees_url":"https://api.github.com/repos/AusDTO/gov-au-beta/assignees{/user}","branches_url":"https://api.github.com/repos/AusDTO/gov-au-beta/branches{/branch}","tags_url":"https://api.github.com/repos/AusDTO/gov-au-beta/tags","blobs_url":"https://api.github.com/repos/AusDTO/gov-au-beta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AusDTO/gov-au-beta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AusDTO/gov-au-beta/git/refs{/sha}","trees_url":"https://api.github.com/repos/AusDTO/gov-au-beta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AusDTO/gov-au-beta/statuses/{sha}","languages_url":"https://api.github.com/repos/AusDTO/gov-au-beta/languages","stargazers_url":"https://api.github.com/repos/AusDTO/gov-au-beta/stargazers","contributors_url":"https://api.github.com/repos/AusDTO/gov-au-beta/contributors","subscribers_url":"https://api.github.com/repos/AusDTO/gov-au-beta/subscribers","subscription_url":"https://api.github.com/repos/AusDTO/gov-au-beta/subscription","commits_url":"https://api.github.com/repos/AusDTO/gov-au-beta/commits{/sha}","git_commits_url":"https://api.github.com/repos/AusDTO/gov-au-beta/git/commits{/sha}","comments_url":"https://api.github.com/repos/AusDTO/gov-au-beta/comments{/number}","issue_comment_url":"https://api.github.com/repos/AusDTO/gov-au-beta/issues/comments{/number}","contents_url":"https://api.github.com/repos/AusDTO/gov-au-beta/contents/{+path}","compare_url":"https://api.github.com/repos/AusDTO/gov-au-beta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AusDTO/gov-au-beta/merges","archive_url":"https://api.github.com/repos/AusDTO/gov-au-beta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AusDTO/gov-au-beta/downloads","issues_url":"https://api.github.com/repos/AusDTO/gov-au-beta/issues{/number}","pulls_url":"https://api.github.com/repos/AusDTO/gov-au-beta/pulls{/number}","milestones_url":"https://api.github.com/repos/AusDTO/gov-au-beta/milestones{/number}","notifications_url":"https://api.github.com/repos/AusDTO/gov-au-beta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AusDTO/gov-au-beta/labels{/name}","releases_url":"https://api.github.com/repos/AusDTO/gov-au-beta/releases{/id}","deployments_url":"https://api.github.com/repos/AusDTO/gov-au-beta/deployments","created_at":"2016-04-29T05:32:18Z","updated_at":"2016-09-02T02:54:29Z","pushed_at":"2016-09-07T06:58:54Z","git_url":"git://github.com/AusDTO/gov-au-beta.git","ssh_url":"git@github.com:AusDTO/gov-au-beta.git","clone_url":"https://github.com/AusDTO/gov-au-beta.git","svn_url":"https://github.com/AusDTO/gov-au-beta","homepage":"","size":4746,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":7,"default_branch":"develop"}},"base":{"label":"AusDTO:develop","ref":"develop","sha":"d6443e937c599a0c1d1a2b213367ed31f4516f13","user":{"login":"AusDTO","id":11763427,"avatar_url":"https://avatars.githubusercontent.com/u/11763427?v=3","gravatar_id":"","url":"https://api.github.com/users/AusDTO","html_url":"https://github.com/AusDTO","followers_url":"https://api.github.com/users/AusDTO/followers","following_url":"https://api.github.com/users/AusDTO/following{/other_user}","gists_url":"https://api.github.com/users/AusDTO/gists{/gist_id}","starred_url":"https://api.github.com/users/AusDTO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AusDTO/subscriptions","organizations_url":"https://api.github.com/users/AusDTO/orgs","repos_url":"https://api.github.com/users/AusDTO/repos","events_url":"https://api.github.com/users/AusDTO/events{/privacy}","received_events_url":"https://api.github.com/users/AusDTO/received_events","type":"Organization","site_admin":false},"repo":{"id":57357025,"name":"gov-au-beta","full_name":"AusDTO/gov-au-beta","owner":{"login":"AusDTO","id":11763427,"avatar_url":"https://avatars.githubusercontent.com/u/11763427?v=3","gravatar_id":"","url":"https://api.github.com/users/AusDTO","html_url":"https://github.com/AusDTO","followers_url":"https://api.github.com/users/AusDTO/followers","following_url":"https://api.github.com/users/AusDTO/following{/other_user}","gists_url":"https://api.github.com/users/AusDTO/gists{/gist_id}","starred_url":"https://api.github.com/users/AusDTO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AusDTO/subscriptions","organizations_url":"https://api.github.com/users/AusDTO/orgs","repos_url":"https://api.github.com/users/AusDTO/repos","events_url":"https://api.github.com/users/AusDTO/events{/privacy}","received_events_url":"https://api.github.com/users/AusDTO/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AusDTO/gov-au-beta","description":"User facing frontend to the GOV.AU content site.","fork":false,"url":"https://api.github.com/repos/AusDTO/gov-au-beta","forks_url":"https://api.github.com/repos/AusDTO/gov-au-beta/forks","keys_url":"https://api.github.com/repos/AusDTO/gov-au-beta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AusDTO/gov-au-beta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AusDTO/gov-au-beta/teams","hooks_url":"https://api.github.com/repos/AusDTO/gov-au-beta/hooks","issue_events_url":"https://api.github.com/repos/AusDTO/gov-au-beta/issues/events{/number}","events_url":"https://api.github.com/repos/AusDTO/gov-au-beta/events","assignees_url":"https://api.github.com/repos/AusDTO/gov-au-beta/assignees{/user}","branches_url":"https://api.github.com/repos/AusDTO/gov-au-beta/branches{/branch}","tags_url":"https://api.github.com/repos/AusDTO/gov-au-beta/tags","blobs_url":"https://api.github.com/repos/AusDTO/gov-au-beta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AusDTO/gov-au-beta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AusDTO/gov-au-beta/git/refs{/sha}","trees_url":"https://api.github.com/repos/AusDTO/gov-au-beta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AusDTO/gov-au-beta/statuses/{sha}","languages_url":"https://api.github.com/repos/AusDTO/gov-au-beta/languages","stargazers_url":"https://api.github.com/repos/AusDTO/gov-au-beta/stargazers","contributors_url":"https://api.github.com/repos/AusDTO/gov-au-beta/contributors","subscribers_url":"https://api.github.com/repos/AusDTO/gov-au-beta/subscribers","subscription_url":"https://api.github.com/repos/AusDTO/gov-au-beta/subscription","commits_url":"https://api.github.com/repos/AusDTO/gov-au-beta/commits{/sha}","git_commits_url":"https://api.github.com/repos/AusDTO/gov-au-beta/git/commits{/sha}","comments_url":"https://api.github.com/repos/AusDTO/gov-au-beta/comments{/number}","issue_comment_url":"https://api.github.com/repos/AusDTO/gov-au-beta/issues/comments{/number}","contents_url":"https://api.github.com/repos/AusDTO/gov-au-beta/contents/{+path}","compare_url":"https://api.github.com/repos/AusDTO/gov-au-beta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AusDTO/gov-au-beta/merges","archive_url":"https://api.github.com/repos/AusDTO/gov-au-beta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AusDTO/gov-au-beta/downloads","issues_url":"https://api.github.com/repos/AusDTO/gov-au-beta/issues{/number}","pulls_url":"https://api.github.com/repos/AusDTO/gov-au-beta/pulls{/number}","milestones_url":"https://api.github.com/repos/AusDTO/gov-au-beta/milestones{/number}","notifications_url":"https://api.github.com/repos/AusDTO/gov-au-beta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AusDTO/gov-au-beta/labels{/name}","releases_url":"https://api.github.com/repos/AusDTO/gov-au-beta/releases{/id}","deployments_url":"https://api.github.com/repos/AusDTO/gov-au-beta/deployments","created_at":"2016-04-29T05:32:18Z","updated_at":"2016-09-02T02:54:29Z","pushed_at":"2016-09-07T06:58:54Z","git_url":"git://github.com/AusDTO/gov-au-beta.git","ssh_url":"git@github.com:AusDTO/gov-au-beta.git","clone_url":"https://github.com/AusDTO/gov-au-beta.git","svn_url":"https://github.com/AusDTO/gov-au-beta","homepage":"","size":4746,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":7,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AusDTO/gov-au-beta/pulls/477"},"html":{"href":"https://github.com/AusDTO/gov-au-beta/pull/477"},"issue":{"href":"https://api.github.com/repos/AusDTO/gov-au-beta/issues/477"},"comments":{"href":"https://api.github.com/repos/AusDTO/gov-au-beta/issues/477/comments"},"review_comments":{"href":"https://api.github.com/repos/AusDTO/gov-au-beta/pulls/477/comments"},"review_comment":{"href":"https://api.github.com/repos/AusDTO/gov-au-beta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AusDTO/gov-au-beta/pulls/477/commits"},"statuses":{"href":"https://api.github.com/repos/AusDTO/gov-au-beta/statuses/c7905f83a1ea9d5a274fe50c2daa23500736a116"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"freshtonic","id":2769,"avatar_url":"https://avatars.githubusercontent.com/u/2769?v=3","gravatar_id":"","url":"https://api.github.com/users/freshtonic","html_url":"https://github.com/freshtonic","followers_url":"https://api.github.com/users/freshtonic/followers","following_url":"https://api.github.com/users/freshtonic/following{/other_user}","gists_url":"https://api.github.com/users/freshtonic/gists{/gist_id}","starred_url":"https://api.github.com/users/freshtonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freshtonic/subscriptions","organizations_url":"https://api.github.com/users/freshtonic/orgs","repos_url":"https://api.github.com/users/freshtonic/repos","events_url":"https://api.github.com/users/freshtonic/events{/privacy}","received_events_url":"https://api.github.com/users/freshtonic/received_events","type":"User","site_admin":false},"comments":6,"review_comments":6,"commits":3,"additions":126,"deletions":117,"changed_files":10}}
{"actor":{"display_login":"freshtonic"}}