{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_57/pulls/comments/32695214","id":32695214,"diff_hunk":"@@ -25,19 +26,23 @@ def logged_in?\n     !current_user.nil?\n   end\n \n+  def admin?\n+    current_user.role == Settings.admin\n+  end\n+\n   def log_out\n     session.delete :user_id\n     @current_user = nil\n   end\n \n-  def forget user\n+  def forget(user)\n     user.forget\n     cookies.delete :user_id\n     cookies.delete :remember_token\n   end\n \n   def log_out\n-    forget current_user\n+  \tforget current_user","path":"app/helpers/sessions_helper.rb","position":28,"original_position":28,"commit_id":"a73500be565fcc2117799581471027cd0da1736d","original_commit_id":"a73500be565fcc2117799581471027cd0da1736d","user":{"login":"phonghenry14","id":10144869,"avatar_url":"https://avatars.githubusercontent.com/u/10144869?v=3","gravatar_id":"","url":"https://api.github.com/users/phonghenry14","html_url":"https://github.com/phonghenry14","followers_url":"https://api.github.com/users/phonghenry14/followers","following_url":"https://api.github.com/users/phonghenry14/following{/other_user}","gists_url":"https://api.github.com/users/phonghenry14/gists{/gist_id}","starred_url":"https://api.github.com/users/phonghenry14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phonghenry14/subscriptions","organizations_url":"https://api.github.com/users/phonghenry14/orgs","repos_url":"https://api.github.com/users/phonghenry14/repos","events_url":"https://api.github.com/users/phonghenry14/events{/privacy}","received_events_url":"https://api.github.com/users/phonghenry14/received_events","type":"User","site_admin":false},"body":"indent","created_at":"2015-06-18T02:42:20Z","updated_at":"2015-06-18T02:42:20Z","html_url":"https://github.com/framgia/fels_57/pull/8#discussion_r32695214","pull_request_url":"https://api.github.com/repos/framgia/fels_57/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_57/pulls/comments/32695214"},"html":{"href":"https://github.com/framgia/fels_57/pull/8#discussion_r32695214"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_57/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_57/pulls/8","id":37966627,"html_url":"https://github.com/framgia/fels_57/pull/8","diff_url":"https://github.com/framgia/fels_57/pull/8.diff","patch_url":"https://github.com/framgia/fels_57/pull/8.patch","issue_url":"https://api.github.com/repos/framgia/fels_57/issues/8","number":8,"state":"open","locked":false,"title":"delete user","user":{"login":"phuongbk","id":8966876,"avatar_url":"https://avatars.githubusercontent.com/u/8966876?v=3","gravatar_id":"","url":"https://api.github.com/users/phuongbk","html_url":"https://github.com/phuongbk","followers_url":"https://api.github.com/users/phuongbk/followers","following_url":"https://api.github.com/users/phuongbk/following{/other_user}","gists_url":"https://api.github.com/users/phuongbk/gists{/gist_id}","starred_url":"https://api.github.com/users/phuongbk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phuongbk/subscriptions","organizations_url":"https://api.github.com/users/phuongbk/orgs","repos_url":"https://api.github.com/users/phuongbk/repos","events_url":"https://api.github.com/users/phuongbk/events{/privacy}","received_events_url":"https://api.github.com/users/phuongbk/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-18T02:36:52Z","updated_at":"2015-06-18T02:42:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b9042de6ea1f04c641be032759fedb23a71d009","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_57/pulls/8/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_57/pulls/8/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_57/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_57/issues/8/comments","statuses_url":"https://api.github.com/repos/framgia/fels_57/statuses/a73500be565fcc2117799581471027cd0da1736d","head":{"label":"phuongbk:admin-user","ref":"admin-user","sha":"a73500be565fcc2117799581471027cd0da1736d","user":{"login":"phuongbk","id":8966876,"avatar_url":"https://avatars.githubusercontent.com/u/8966876?v=3","gravatar_id":"","url":"https://api.github.com/users/phuongbk","html_url":"https://github.com/phuongbk","followers_url":"https://api.github.com/users/phuongbk/followers","following_url":"https://api.github.com/users/phuongbk/following{/other_user}","gists_url":"https://api.github.com/users/phuongbk/gists{/gist_id}","starred_url":"https://api.github.com/users/phuongbk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phuongbk/subscriptions","organizations_url":"https://api.github.com/users/phuongbk/orgs","repos_url":"https://api.github.com/users/phuongbk/repos","events_url":"https://api.github.com/users/phuongbk/events{/privacy}","received_events_url":"https://api.github.com/users/phuongbk/received_events","type":"User","site_admin":false},"repo":{"id":36239255,"name":"fels_57","full_name":"phuongbk/fels_57","owner":{"login":"phuongbk","id":8966876,"avatar_url":"https://avatars.githubusercontent.com/u/8966876?v=3","gravatar_id":"","url":"https://api.github.com/users/phuongbk","html_url":"https://github.com/phuongbk","followers_url":"https://api.github.com/users/phuongbk/followers","following_url":"https://api.github.com/users/phuongbk/following{/other_user}","gists_url":"https://api.github.com/users/phuongbk/gists{/gist_id}","starred_url":"https://api.github.com/users/phuongbk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phuongbk/subscriptions","organizations_url":"https://api.github.com/users/phuongbk/orgs","repos_url":"https://api.github.com/users/phuongbk/repos","events_url":"https://api.github.com/users/phuongbk/events{/privacy}","received_events_url":"https://api.github.com/users/phuongbk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phuongbk/fels_57","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/phuongbk/fels_57","forks_url":"https://api.github.com/repos/phuongbk/fels_57/forks","keys_url":"https://api.github.com/repos/phuongbk/fels_57/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phuongbk/fels_57/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phuongbk/fels_57/teams","hooks_url":"https://api.github.com/repos/phuongbk/fels_57/hooks","issue_events_url":"https://api.github.com/repos/phuongbk/fels_57/issues/events{/number}","events_url":"https://api.github.com/repos/phuongbk/fels_57/events","assignees_url":"https://api.github.com/repos/phuongbk/fels_57/assignees{/user}","branches_url":"https://api.github.com/repos/phuongbk/fels_57/branches{/branch}","tags_url":"https://api.github.com/repos/phuongbk/fels_57/tags","blobs_url":"https://api.github.com/repos/phuongbk/fels_57/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phuongbk/fels_57/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phuongbk/fels_57/git/refs{/sha}","trees_url":"https://api.github.com/repos/phuongbk/fels_57/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phuongbk/fels_57/statuses/{sha}","languages_url":"https://api.github.com/repos/phuongbk/fels_57/languages","stargazers_url":"https://api.github.com/repos/phuongbk/fels_57/stargazers","contributors_url":"https://api.github.com/repos/phuongbk/fels_57/contributors","subscribers_url":"https://api.github.com/repos/phuongbk/fels_57/subscribers","subscription_url":"https://api.github.com/repos/phuongbk/fels_57/subscription","commits_url":"https://api.github.com/repos/phuongbk/fels_57/commits{/sha}","git_commits_url":"https://api.github.com/repos/phuongbk/fels_57/git/commits{/sha}","comments_url":"https://api.github.com/repos/phuongbk/fels_57/comments{/number}","issue_comment_url":"https://api.github.com/repos/phuongbk/fels_57/issues/comments{/number}","contents_url":"https://api.github.com/repos/phuongbk/fels_57/contents/{+path}","compare_url":"https://api.github.com/repos/phuongbk/fels_57/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phuongbk/fels_57/merges","archive_url":"https://api.github.com/repos/phuongbk/fels_57/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phuongbk/fels_57/downloads","issues_url":"https://api.github.com/repos/phuongbk/fels_57/issues{/number}","pulls_url":"https://api.github.com/repos/phuongbk/fels_57/pulls{/number}","milestones_url":"https://api.github.com/repos/phuongbk/fels_57/milestones{/number}","notifications_url":"https://api.github.com/repos/phuongbk/fels_57/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phuongbk/fels_57/labels{/name}","releases_url":"https://api.github.com/repos/phuongbk/fels_57/releases{/id}","created_at":"2015-05-25T15:39:13Z","updated_at":"2015-05-22T02:07:22Z","pushed_at":"2015-06-18T02:35:07Z","git_url":"git://github.com/phuongbk/fels_57.git","ssh_url":"git@github.com:phuongbk/fels_57.git","clone_url":"https://github.com/phuongbk/fels_57.git","svn_url":"https://github.com/phuongbk/fels_57","homepage":null,"size":100,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"0c4fef33229f4a705e0190fdc600dec5e11de839","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":36047114,"name":"fels_57","full_name":"framgia/fels_57","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/fels_57","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_57","forks_url":"https://api.github.com/repos/framgia/fels_57/forks","keys_url":"https://api.github.com/repos/framgia/fels_57/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_57/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_57/teams","hooks_url":"https://api.github.com/repos/framgia/fels_57/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_57/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_57/events","assignees_url":"https://api.github.com/repos/framgia/fels_57/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_57/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_57/tags","blobs_url":"https://api.github.com/repos/framgia/fels_57/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_57/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_57/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_57/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_57/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_57/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_57/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_57/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_57/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_57/subscription","commits_url":"https://api.github.com/repos/framgia/fels_57/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_57/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_57/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_57/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_57/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_57/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_57/merges","archive_url":"https://api.github.com/repos/framgia/fels_57/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_57/downloads","issues_url":"https://api.github.com/repos/framgia/fels_57/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_57/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_57/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_57/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_57/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_57/releases{/id}","created_at":"2015-05-22T02:07:22Z","updated_at":"2015-05-22T02:07:22Z","pushed_at":"2015-06-18T02:36:52Z","git_url":"git://github.com/framgia/fels_57.git","ssh_url":"git@github.com:framgia/fels_57.git","clone_url":"https://github.com/framgia/fels_57.git","svn_url":"https://github.com/framgia/fels_57","homepage":null,"size":123,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_57/pulls/8"},"html":{"href":"https://github.com/framgia/fels_57/pull/8"},"issue":{"href":"https://api.github.com/repos/framgia/fels_57/issues/8"},"comments":{"href":"https://api.github.com/repos/framgia/fels_57/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_57/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_57/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_57/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_57/statuses/a73500be565fcc2117799581471027cd0da1736d"}}}}