{"action":"created","comment":{"url":"https://api.github.com/repos/alfagen/aml/pulls/comments/209732436","pull_request_review_id":145803825,"id":209732436,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTczMjQzNg==","diff_hunk":"@@ -1,5 +1,22 @@\n class PasswordsController < ApplicationController\n+  skip_before_action :require_login, :unless => :password_changed?\n+\n   def edit\n-    render :edit, locals: { user: User.find(params[:id]) }\n+    login user_session.login, 'password', true unless current_user\n+    render :edit, locals: { user: user }\n+  end\n+  \n+  private\n+\n+  def user\n+    @user ||= User.find params[:id]\n+  end\n+\n+  def user_session\n+    @user_session ||= UserSession.new(login: user.email, password: 'password')\n+  end\n+\n+  def password_changed?\n+    user.password_changed == true","path":"app/controllers/passwords_controller.rb","position":21,"original_position":21,"commit_id":"3b9ada6c49d7f8c7c990b9ec1384d6a2a53539b1","original_commit_id":"3b9ada6c49d7f8c7c990b9ec1384d6a2a53539b1","user":{"login":"dapi","id":31139,"node_id":"MDQ6VXNlcjMxMTM5","avatar_url":"https://avatars2.githubusercontent.com/u/31139?v=4","gravatar_id":"","url":"https://api.github.com/users/dapi","html_url":"https://github.com/dapi","followers_url":"https://api.github.com/users/dapi/followers","following_url":"https://api.github.com/users/dapi/following{/other_user}","gists_url":"https://api.github.com/users/dapi/gists{/gist_id}","starred_url":"https://api.github.com/users/dapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dapi/subscriptions","organizations_url":"https://api.github.com/users/dapi/orgs","repos_url":"https://api.github.com/users/dapi/repos","events_url":"https://api.github.com/users/dapi/events{/privacy}","received_events_url":"https://api.github.com/users/dapi/received_events","type":"User","site_admin":false},"body":"В этом контролере явно что-то не то.","created_at":"2018-08-13T19:37:00Z","updated_at":"2018-08-13T19:37:00Z","html_url":"https://github.com/alfagen/aml/pull/36#discussion_r209732436","pull_request_url":"https://api.github.com/repos/alfagen/aml/pulls/36","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/alfagen/aml/pulls/comments/209732436"},"html":{"href":"https://github.com/alfagen/aml/pull/36#discussion_r209732436"},"pull_request":{"href":"https://api.github.com/repos/alfagen/aml/pulls/36"}},"in_reply_to_id":209732376},"pull_request":{"url":"https://api.github.com/repos/alfagen/aml/pulls/36","id":207975323,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3OTc1MzIz","html_url":"https://github.com/alfagen/aml/pull/36","diff_url":"https://github.com/alfagen/aml/pull/36.diff","patch_url":"https://github.com/alfagen/aml/pull/36.patch","issue_url":"https://api.github.com/repos/alfagen/aml/issues/36","number":36,"state":"open","locked":false,"title":"[#25] Feature/email","user":{"login":"ValentinAndreev","id":19556071,"node_id":"MDQ6VXNlcjE5NTU2MDcx","avatar_url":"https://avatars2.githubusercontent.com/u/19556071?v=4","gravatar_id":"","url":"https://api.github.com/users/ValentinAndreev","html_url":"https://github.com/ValentinAndreev","followers_url":"https://api.github.com/users/ValentinAndreev/followers","following_url":"https://api.github.com/users/ValentinAndreev/following{/other_user}","gists_url":"https://api.github.com/users/ValentinAndreev/gists{/gist_id}","starred_url":"https://api.github.com/users/ValentinAndreev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ValentinAndreev/subscriptions","organizations_url":"https://api.github.com/users/ValentinAndreev/orgs","repos_url":"https://api.github.com/users/ValentinAndreev/repos","events_url":"https://api.github.com/users/ValentinAndreev/events{/privacy}","received_events_url":"https://api.github.com/users/ValentinAndreev/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-13T13:20:29Z","updated_at":"2018-08-13T19:37:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d5940eb5e9e370563515505500ad5e0dbc1aa5f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alfagen/aml/pulls/36/commits","review_comments_url":"https://api.github.com/repos/alfagen/aml/pulls/36/comments","review_comment_url":"https://api.github.com/repos/alfagen/aml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alfagen/aml/issues/36/comments","statuses_url":"https://api.github.com/repos/alfagen/aml/statuses/3b9ada6c49d7f8c7c990b9ec1384d6a2a53539b1","head":{"label":"alfagen:feature/email","ref":"feature/email","sha":"3b9ada6c49d7f8c7c990b9ec1384d6a2a53539b1","user":{"login":"alfagen","id":36159568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MTU5NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/36159568?v=4","gravatar_id":"","url":"https://api.github.com/users/alfagen","html_url":"https://github.com/alfagen","followers_url":"https://api.github.com/users/alfagen/followers","following_url":"https://api.github.com/users/alfagen/following{/other_user}","gists_url":"https://api.github.com/users/alfagen/gists{/gist_id}","starred_url":"https://api.github.com/users/alfagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfagen/subscriptions","organizations_url":"https://api.github.com/users/alfagen/orgs","repos_url":"https://api.github.com/users/alfagen/repos","events_url":"https://api.github.com/users/alfagen/events{/privacy}","received_events_url":"https://api.github.com/users/alfagen/received_events","type":"Organization","site_admin":false},"repo":{"id":143115246,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMxMTUyNDY=","name":"aml","full_name":"alfagen/aml","owner":{"login":"alfagen","id":36159568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MTU5NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/36159568?v=4","gravatar_id":"","url":"https://api.github.com/users/alfagen","html_url":"https://github.com/alfagen","followers_url":"https://api.github.com/users/alfagen/followers","following_url":"https://api.github.com/users/alfagen/following{/other_user}","gists_url":"https://api.github.com/users/alfagen/gists{/gist_id}","starred_url":"https://api.github.com/users/alfagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfagen/subscriptions","organizations_url":"https://api.github.com/users/alfagen/orgs","repos_url":"https://api.github.com/users/alfagen/repos","events_url":"https://api.github.com/users/alfagen/events{/privacy}","received_events_url":"https://api.github.com/users/alfagen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alfagen/aml","description":"AML (Anti-money laundering) processing application","fork":false,"url":"https://api.github.com/repos/alfagen/aml","forks_url":"https://api.github.com/repos/alfagen/aml/forks","keys_url":"https://api.github.com/repos/alfagen/aml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alfagen/aml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alfagen/aml/teams","hooks_url":"https://api.github.com/repos/alfagen/aml/hooks","issue_events_url":"https://api.github.com/repos/alfagen/aml/issues/events{/number}","events_url":"https://api.github.com/repos/alfagen/aml/events","assignees_url":"https://api.github.com/repos/alfagen/aml/assignees{/user}","branches_url":"https://api.github.com/repos/alfagen/aml/branches{/branch}","tags_url":"https://api.github.com/repos/alfagen/aml/tags","blobs_url":"https://api.github.com/repos/alfagen/aml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alfagen/aml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alfagen/aml/git/refs{/sha}","trees_url":"https://api.github.com/repos/alfagen/aml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alfagen/aml/statuses/{sha}","languages_url":"https://api.github.com/repos/alfagen/aml/languages","stargazers_url":"https://api.github.com/repos/alfagen/aml/stargazers","contributors_url":"https://api.github.com/repos/alfagen/aml/contributors","subscribers_url":"https://api.github.com/repos/alfagen/aml/subscribers","subscription_url":"https://api.github.com/repos/alfagen/aml/subscription","commits_url":"https://api.github.com/repos/alfagen/aml/commits{/sha}","git_commits_url":"https://api.github.com/repos/alfagen/aml/git/commits{/sha}","comments_url":"https://api.github.com/repos/alfagen/aml/comments{/number}","issue_comment_url":"https://api.github.com/repos/alfagen/aml/issues/comments{/number}","contents_url":"https://api.github.com/repos/alfagen/aml/contents/{+path}","compare_url":"https://api.github.com/repos/alfagen/aml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alfagen/aml/merges","archive_url":"https://api.github.com/repos/alfagen/aml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alfagen/aml/downloads","issues_url":"https://api.github.com/repos/alfagen/aml/issues{/number}","pulls_url":"https://api.github.com/repos/alfagen/aml/pulls{/number}","milestones_url":"https://api.github.com/repos/alfagen/aml/milestones{/number}","notifications_url":"https://api.github.com/repos/alfagen/aml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alfagen/aml/labels{/name}","releases_url":"https://api.github.com/repos/alfagen/aml/releases{/id}","deployments_url":"https://api.github.com/repos/alfagen/aml/deployments","created_at":"2018-08-01T06:46:36Z","updated_at":"2018-08-13T09:58:57Z","pushed_at":"2018-08-13T17:18:06Z","git_url":"git://github.com/alfagen/aml.git","ssh_url":"git@github.com:alfagen/aml.git","clone_url":"https://github.com/alfagen/aml.git","svn_url":"https://github.com/alfagen/aml","homepage":"","size":262,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":6,"license":null,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"alfagen:master","ref":"master","sha":"59b92a08dcfc5c41c14842c0469e168e1b15b769","user":{"login":"alfagen","id":36159568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MTU5NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/36159568?v=4","gravatar_id":"","url":"https://api.github.com/users/alfagen","html_url":"https://github.com/alfagen","followers_url":"https://api.github.com/users/alfagen/followers","following_url":"https://api.github.com/users/alfagen/following{/other_user}","gists_url":"https://api.github.com/users/alfagen/gists{/gist_id}","starred_url":"https://api.github.com/users/alfagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfagen/subscriptions","organizations_url":"https://api.github.com/users/alfagen/orgs","repos_url":"https://api.github.com/users/alfagen/repos","events_url":"https://api.github.com/users/alfagen/events{/privacy}","received_events_url":"https://api.github.com/users/alfagen/received_events","type":"Organization","site_admin":false},"repo":{"id":143115246,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMxMTUyNDY=","name":"aml","full_name":"alfagen/aml","owner":{"login":"alfagen","id":36159568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MTU5NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/36159568?v=4","gravatar_id":"","url":"https://api.github.com/users/alfagen","html_url":"https://github.com/alfagen","followers_url":"https://api.github.com/users/alfagen/followers","following_url":"https://api.github.com/users/alfagen/following{/other_user}","gists_url":"https://api.github.com/users/alfagen/gists{/gist_id}","starred_url":"https://api.github.com/users/alfagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfagen/subscriptions","organizations_url":"https://api.github.com/users/alfagen/orgs","repos_url":"https://api.github.com/users/alfagen/repos","events_url":"https://api.github.com/users/alfagen/events{/privacy}","received_events_url":"https://api.github.com/users/alfagen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alfagen/aml","description":"AML (Anti-money laundering) processing application","fork":false,"url":"https://api.github.com/repos/alfagen/aml","forks_url":"https://api.github.com/repos/alfagen/aml/forks","keys_url":"https://api.github.com/repos/alfagen/aml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alfagen/aml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alfagen/aml/teams","hooks_url":"https://api.github.com/repos/alfagen/aml/hooks","issue_events_url":"https://api.github.com/repos/alfagen/aml/issues/events{/number}","events_url":"https://api.github.com/repos/alfagen/aml/events","assignees_url":"https://api.github.com/repos/alfagen/aml/assignees{/user}","branches_url":"https://api.github.com/repos/alfagen/aml/branches{/branch}","tags_url":"https://api.github.com/repos/alfagen/aml/tags","blobs_url":"https://api.github.com/repos/alfagen/aml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alfagen/aml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alfagen/aml/git/refs{/sha}","trees_url":"https://api.github.com/repos/alfagen/aml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alfagen/aml/statuses/{sha}","languages_url":"https://api.github.com/repos/alfagen/aml/languages","stargazers_url":"https://api.github.com/repos/alfagen/aml/stargazers","contributors_url":"https://api.github.com/repos/alfagen/aml/contributors","subscribers_url":"https://api.github.com/repos/alfagen/aml/subscribers","subscription_url":"https://api.github.com/repos/alfagen/aml/subscription","commits_url":"https://api.github.com/repos/alfagen/aml/commits{/sha}","git_commits_url":"https://api.github.com/repos/alfagen/aml/git/commits{/sha}","comments_url":"https://api.github.com/repos/alfagen/aml/comments{/number}","issue_comment_url":"https://api.github.com/repos/alfagen/aml/issues/comments{/number}","contents_url":"https://api.github.com/repos/alfagen/aml/contents/{+path}","compare_url":"https://api.github.com/repos/alfagen/aml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alfagen/aml/merges","archive_url":"https://api.github.com/repos/alfagen/aml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alfagen/aml/downloads","issues_url":"https://api.github.com/repos/alfagen/aml/issues{/number}","pulls_url":"https://api.github.com/repos/alfagen/aml/pulls{/number}","milestones_url":"https://api.github.com/repos/alfagen/aml/milestones{/number}","notifications_url":"https://api.github.com/repos/alfagen/aml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alfagen/aml/labels{/name}","releases_url":"https://api.github.com/repos/alfagen/aml/releases{/id}","deployments_url":"https://api.github.com/repos/alfagen/aml/deployments","created_at":"2018-08-01T06:46:36Z","updated_at":"2018-08-13T09:58:57Z","pushed_at":"2018-08-13T17:18:06Z","git_url":"git://github.com/alfagen/aml.git","ssh_url":"git@github.com:alfagen/aml.git","clone_url":"https://github.com/alfagen/aml.git","svn_url":"https://github.com/alfagen/aml","homepage":"","size":262,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":6,"license":null,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alfagen/aml/pulls/36"},"html":{"href":"https://github.com/alfagen/aml/pull/36"},"issue":{"href":"https://api.github.com/repos/alfagen/aml/issues/36"},"comments":{"href":"https://api.github.com/repos/alfagen/aml/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/alfagen/aml/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/alfagen/aml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alfagen/aml/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/alfagen/aml/statuses/3b9ada6c49d7f8c7c990b9ec1384d6a2a53539b1"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"dapi"}}