{"action":"created","issue":{"url":"https://api.github.com/repos/openSUSE/open-build-service/issues/1615","repository_url":"https://api.github.com/repos/openSUSE/open-build-service","labels_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/1615/labels{/name}","comments_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/1615/comments","events_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/1615/events","html_url":"https://github.com/openSUSE/open-build-service/pull/1615","id":139299139,"number":1615,"title":"[webui] redirect logins from /user/do_login to :home","user":{"login":"cschneemann","id":715040,"avatar_url":"https://avatars.githubusercontent.com/u/715040?v=3","gravatar_id":"","url":"https://api.github.com/users/cschneemann","html_url":"https://github.com/cschneemann","followers_url":"https://api.github.com/users/cschneemann/followers","following_url":"https://api.github.com/users/cschneemann/following{/other_user}","gists_url":"https://api.github.com/users/cschneemann/gists{/gist_id}","starred_url":"https://api.github.com/users/cschneemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cschneemann/subscriptions","organizations_url":"https://api.github.com/users/cschneemann/orgs","repos_url":"https://api.github.com/users/cschneemann/repos","events_url":"https://api.github.com/users/cschneemann/events{/privacy}","received_events_url":"https://api.github.com/users/cschneemann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-08T15:00:20Z","updated_at":"2016-03-09T10:11:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/1615","html_url":"https://github.com/openSUSE/open-build-service/pull/1615","diff_url":"https://github.com/openSUSE/open-build-service/pull/1615.diff","patch_url":"https://github.com/openSUSE/open-build-service/pull/1615.patch"},"body":"Logins from /user/do_login page redirects to th 404 page because a get route for /user/do_login is missing, redirecting into :home to fix that.\r\n\r\nthis commit fixes #1557"},"comment":{"url":"https://api.github.com/repos/openSUSE/open-build-service/issues/comments/194222296","html_url":"https://github.com/openSUSE/open-build-service/pull/1615#issuecomment-194222296","issue_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/1615","id":194222296,"user":{"login":"bgeuken","id":968949,"avatar_url":"https://avatars.githubusercontent.com/u/968949?v=3","gravatar_id":"","url":"https://api.github.com/users/bgeuken","html_url":"https://github.com/bgeuken","followers_url":"https://api.github.com/users/bgeuken/followers","following_url":"https://api.github.com/users/bgeuken/following{/other_user}","gists_url":"https://api.github.com/users/bgeuken/gists{/gist_id}","starred_url":"https://api.github.com/users/bgeuken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgeuken/subscriptions","organizations_url":"https://api.github.com/users/bgeuken/orgs","repos_url":"https://api.github.com/users/bgeuken/repos","events_url":"https://api.github.com/users/bgeuken/events{/privacy}","received_events_url":"https://api.github.com/users/bgeuken/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T10:11:01Z","updated_at":"2016-03-09T10:11:01Z","body":"And our tests are not exactly easy to read;-)\r\n\r\nTook me a while, but what seems to work is this, in the do_login action:\r\n```ruby\r\n    if request.referer.end_with?(\"/user/login\")\r\n      redirect_to home_path\r\n    else\r\n      redirect_back_or_to root_path\r\n    end\r\n```\r\n\r\nMost likely that would also work in 2.6"}}