GitHub PullRequestReviewCommentEvent at 2014-09-26 14:58:37
Repository: ok_bus
Actor: hchood
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/comments/18093587","id":18093587,"diff_hunk":"@@ -4,6 +4,19 @@ class ApplicationController < ActionController::Base\n   protect_from_forgery with: :exception\n   before_action :configure_permitted_parameters, if: :devise_controller?\n \n+  def authorize!\n+    if current_user.nil? || !current_user.admin?\n+      flash[:notice] = \"You must be an admin to access this!\"\n+      redirect_to root_path\n+    end\n+  end\n+  #\n+  # def check_user!\n+  #   @review = Review.find(params[id])\n+  #   if current_user.id == @review.user_id || current_user.admin?\n+  #   end\n+  # end","path":"app/controllers/application_controller.rb","position":15,"original_position":15,"commit_id":"3ec7b47f7302069e331c0124d4dc5795f5600927","original_commit_id":"3ec7b47f7302069e331c0124d4dc5795f5600927","user":{"login":"hchood","id":4464987,"avatar_url":"https://avatars.githubusercontent.com/u/4464987?v=2","gravatar_id":"","url":"https://api.github.com/users/hchood","html_url":"https://github.com/hchood","followers_url":"https://api.github.com/users/hchood/followers","following_url":"https://api.github.com/users/hchood/following{/other_user}","gists_url":"https://api.github.com/users/hchood/gists{/gist_id}","starred_url":"https://api.github.com/users/hchood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hchood/subscriptions","organizations_url":"https://api.github.com/users/hchood/orgs","repos_url":"https://api.github.com/users/hchood/repos","events_url":"https://api.github.com/users/hchood/events{/privacy}","received_events_url":"https://api.github.com/users/hchood/received_events","type":"User","site_admin":false},"body":"Remove commented code","created_at":"2014-09-26T14:58:37Z","updated_at":"2014-09-26T14:58:37Z","html_url":"https://github.com/LaunchAcademy/ok_bus/pull/23#discussion_r18093587","pull_request_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/comments/18093587"},"html":{"href":"https://github.com/LaunchAcademy/ok_bus/pull/23#discussion_r18093587"},"pull_request":{"href":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/23","id":21797351,"html_url":"https://github.com/LaunchAcademy/ok_bus/pull/23","diff_url":"https://github.com/LaunchAcademy/ok_bus/pull/23.diff","patch_url":"https://github.com/LaunchAcademy/ok_bus/pull/23.patch","issue_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/issues/23","number":23,"state":"open","locked":false,"title":"WIP - Add admin functionality","user":{"login":"jonrloh","id":7981308,"avatar_url":"https://avatars.githubusercontent.com/u/7981308?v=2","gravatar_id":"","url":"https://api.github.com/users/jonrloh","html_url":"https://github.com/jonrloh","followers_url":"https://api.github.com/users/jonrloh/followers","following_url":"https://api.github.com/users/jonrloh/following{/other_user}","gists_url":"https://api.github.com/users/jonrloh/gists{/gist_id}","starred_url":"https://api.github.com/users/jonrloh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonrloh/subscriptions","organizations_url":"https://api.github.com/users/jonrloh/orgs","repos_url":"https://api.github.com/users/jonrloh/repos","events_url":"https://api.github.com/users/jonrloh/events{/privacy}","received_events_url":"https://api.github.com/users/jonrloh/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-25T17:05:54Z","updated_at":"2014-09-26T14:58:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1aecec73ad4915db91ccb51c263e52f0939a7797","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/23/commits","review_comments_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/23/comments","review_comment_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/comments/{number}","comments_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/issues/23/comments","statuses_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/statuses/3ec7b47f7302069e331c0124d4dc5795f5600927","head":{"label":"LaunchAcademy:add_admin_functionality","ref":"add_admin_functionality","sha":"3ec7b47f7302069e331c0124d4dc5795f5600927","user":{"login":"LaunchAcademy","id":3612691,"avatar_url":"https://avatars.githubusercontent.com/u/3612691?v=2","gravatar_id":"","url":"https://api.github.com/users/LaunchAcademy","html_url":"https://github.com/LaunchAcademy","followers_url":"https://api.github.com/users/LaunchAcademy/followers","following_url":"https://api.github.com/users/LaunchAcademy/following{/other_user}","gists_url":"https://api.github.com/users/LaunchAcademy/gists{/gist_id}","starred_url":"https://api.github.com/users/LaunchAcademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaunchAcademy/subscriptions","organizations_url":"https://api.github.com/users/LaunchAcademy/orgs","repos_url":"https://api.github.com/users/LaunchAcademy/repos","events_url":"https://api.github.com/users/LaunchAcademy/events{/privacy}","received_events_url":"https://api.github.com/users/LaunchAcademy/received_events","type":"Organization","site_admin":false},"repo":{"id":24334987,"name":"ok_bus","full_name":"LaunchAcademy/ok_bus","owner":{"login":"LaunchAcademy","id":3612691,"avatar_url":"https://avatars.githubusercontent.com/u/3612691?v=2","gravatar_id":"","url":"https://api.github.com/users/LaunchAcademy","html_url":"https://github.com/LaunchAcademy","followers_url":"https://api.github.com/users/LaunchAcademy/followers","following_url":"https://api.github.com/users/LaunchAcademy/following{/other_user}","gists_url":"https://api.github.com/users/LaunchAcademy/gists{/gist_id}","starred_url":"https://api.github.com/users/LaunchAcademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaunchAcademy/subscriptions","organizations_url":"https://api.github.com/users/LaunchAcademy/orgs","repos_url":"https://api.github.com/users/LaunchAcademy/repos","events_url":"https://api.github.com/users/LaunchAcademy/events{/privacy}","received_events_url":"https://api.github.com/users/LaunchAcademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LaunchAcademy/ok_bus","description":"A review site for buses","fork":false,"url":"https://api.github.com/repos/LaunchAcademy/ok_bus","forks_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/forks","keys_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/teams","hooks_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/hooks","issue_events_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/issues/events{/number}","events_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/events","assignees_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/assignees{/user}","branches_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/branches{/branch}","tags_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/tags","blobs_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/git/refs{/sha}","trees_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/statuses/{sha}","languages_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/languages","stargazers_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/stargazers","contributors_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/contributors","subscribers_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/subscribers","subscription_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/subscription","commits_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/commits{/sha}","git_commits_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/git/commits{/sha}","comments_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/comments{/number}","issue_comment_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/issues/comments/{number}","contents_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/contents/{+path}","compare_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/merges","archive_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/downloads","issues_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/issues{/number}","pulls_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls{/number}","milestones_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/milestones{/number}","notifications_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/labels{/name}","releases_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/releases{/id}","created_at":"2014-09-22T15:49:22Z","updated_at":"2014-09-25T14:19:50Z","pushed_at":"2014-09-26T14:56:15Z","git_url":"git://github.com/LaunchAcademy/ok_bus.git","ssh_url":"git@github.com:LaunchAcademy/ok_bus.git","clone_url":"https://github.com/LaunchAcademy/ok_bus.git","svn_url":"https://github.com/LaunchAcademy/ok_bus","homepage":null,"size":1049,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":1,"default_branch":"master"}},"base":{"label":"LaunchAcademy:master","ref":"master","sha":"e894366f31526a55ec8e230b1b41bc635300f557","user":{"login":"LaunchAcademy","id":3612691,"avatar_url":"https://avatars.githubusercontent.com/u/3612691?v=2","gravatar_id":"","url":"https://api.github.com/users/LaunchAcademy","html_url":"https://github.com/LaunchAcademy","followers_url":"https://api.github.com/users/LaunchAcademy/followers","following_url":"https://api.github.com/users/LaunchAcademy/following{/other_user}","gists_url":"https://api.github.com/users/LaunchAcademy/gists{/gist_id}","starred_url":"https://api.github.com/users/LaunchAcademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaunchAcademy/subscriptions","organizations_url":"https://api.github.com/users/LaunchAcademy/orgs","repos_url":"https://api.github.com/users/LaunchAcademy/repos","events_url":"https://api.github.com/users/LaunchAcademy/events{/privacy}","received_events_url":"https://api.github.com/users/LaunchAcademy/received_events","type":"Organization","site_admin":false},"repo":{"id":24334987,"name":"ok_bus","full_name":"LaunchAcademy/ok_bus","owner":{"login":"LaunchAcademy","id":3612691,"avatar_url":"https://avatars.githubusercontent.com/u/3612691?v=2","gravatar_id":"","url":"https://api.github.com/users/LaunchAcademy","html_url":"https://github.com/LaunchAcademy","followers_url":"https://api.github.com/users/LaunchAcademy/followers","following_url":"https://api.github.com/users/LaunchAcademy/following{/other_user}","gists_url":"https://api.github.com/users/LaunchAcademy/gists{/gist_id}","starred_url":"https://api.github.com/users/LaunchAcademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaunchAcademy/subscriptions","organizations_url":"https://api.github.com/users/LaunchAcademy/orgs","repos_url":"https://api.github.com/users/LaunchAcademy/repos","events_url":"https://api.github.com/users/LaunchAcademy/events{/privacy}","received_events_url":"https://api.github.com/users/LaunchAcademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LaunchAcademy/ok_bus","description":"A review site for buses","fork":false,"url":"https://api.github.com/repos/LaunchAcademy/ok_bus","forks_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/forks","keys_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/teams","hooks_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/hooks","issue_events_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/issues/events{/number}","events_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/events","assignees_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/assignees{/user}","branches_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/branches{/branch}","tags_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/tags","blobs_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/git/refs{/sha}","trees_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/statuses/{sha}","languages_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/languages","stargazers_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/stargazers","contributors_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/contributors","subscribers_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/subscribers","subscription_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/subscription","commits_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/commits{/sha}","git_commits_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/git/commits{/sha}","comments_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/comments{/number}","issue_comment_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/issues/comments/{number}","contents_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/contents/{+path}","compare_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/merges","archive_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/downloads","issues_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/issues{/number}","pulls_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls{/number}","milestones_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/milestones{/number}","notifications_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/labels{/name}","releases_url":"https://api.github.com/repos/LaunchAcademy/ok_bus/releases{/id}","created_at":"2014-09-22T15:49:22Z","updated_at":"2014-09-25T14:19:50Z","pushed_at":"2014-09-26T14:56:15Z","git_url":"git://github.com/LaunchAcademy/ok_bus.git","ssh_url":"git@github.com:LaunchAcademy/ok_bus.git","clone_url":"https://github.com/LaunchAcademy/ok_bus.git","svn_url":"https://github.com/LaunchAcademy/ok_bus","homepage":null,"size":1049,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/23"},"html":{"href":"https://github.com/LaunchAcademy/ok_bus/pull/23"},"issue":{"href":"https://api.github.com/repos/LaunchAcademy/ok_bus/issues/23"},"comments":{"href":"https://api.github.com/repos/LaunchAcademy/ok_bus/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/LaunchAcademy/ok_bus/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/LaunchAcademy/ok_bus/statuses/3ec7b47f7302069e331c0124d4dc5795f5600927"}}}}