{"action":"created","comment":{"url":"https://api.github.com/repos/Fablic/training/pulls/comments/229926294","pull_request_review_id":170541564,"id":229926294,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTkyNjI5NA==","diff_hunk":"@@ -3,9 +3,15 @@\n module Admin\n   class UsersController < ApplicationController\n     before_action :set_user, only: %i[show edit update destroy]\n+    before_action :auth_check, only: %i[show edit update destroy]\n \n     def index\n-      @users = User.all\n+      case current_user.role","path":"KTask/app/controllers/admin/users_controller.rb","position":8,"original_position":8,"commit_id":"c7a0a837d3401245b5610412ec5c3fcfa8f26a9e","original_commit_id":"58cbb8200f977550af6fef7d98b76a7100189d31","user":{"login":"kim2214","id":17827803,"node_id":"MDQ6VXNlcjE3ODI3ODAz","avatar_url":"https://avatars0.githubusercontent.com/u/17827803?v=4","gravatar_id":"","url":"https://api.github.com/users/kim2214","html_url":"https://github.com/kim2214","followers_url":"https://api.github.com/users/kim2214/followers","following_url":"https://api.github.com/users/kim2214/following{/other_user}","gists_url":"https://api.github.com/users/kim2214/gists{/gist_id}","starred_url":"https://api.github.com/users/kim2214/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kim2214/subscriptions","organizations_url":"https://api.github.com/users/kim2214/orgs","repos_url":"https://api.github.com/users/kim2214/repos","events_url":"https://api.github.com/users/kim2214/events{/privacy}","received_events_url":"https://api.github.com/users/kim2214/received_events","type":"User","site_admin":false},"body":"消し忘れでした、、、すみません。🙇‍♂️","created_at":"2018-11-01T02:56:42Z","updated_at":"2018-11-01T02:56:42Z","html_url":"https://github.com/Fablic/training/pull/192#discussion_r229926294","pull_request_url":"https://api.github.com/repos/Fablic/training/pulls/192","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Fablic/training/pulls/comments/229926294"},"html":{"href":"https://github.com/Fablic/training/pull/192#discussion_r229926294"},"pull_request":{"href":"https://api.github.com/repos/Fablic/training/pulls/192"}},"in_reply_to_id":229179137},"pull_request":{"url":"https://api.github.com/repos/Fablic/training/pulls/192","id":226476647,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2NDc2NjQ3","html_url":"https://github.com/Fablic/training/pull/192","diff_url":"https://github.com/Fablic/training/pull/192.diff","patch_url":"https://github.com/Fablic/training/pull/192.patch","issue_url":"https://api.github.com/repos/Fablic/training/issues/192","number":192,"state":"open","locked":false,"title":"「ギュ」ステップ19: ユーザロールを追加","user":{"login":"kim2214","id":17827803,"node_id":"MDQ6VXNlcjE3ODI3ODAz","avatar_url":"https://avatars0.githubusercontent.com/u/17827803?v=4","gravatar_id":"","url":"https://api.github.com/users/kim2214","html_url":"https://github.com/kim2214","followers_url":"https://api.github.com/users/kim2214/followers","following_url":"https://api.github.com/users/kim2214/following{/other_user}","gists_url":"https://api.github.com/users/kim2214/gists{/gist_id}","starred_url":"https://api.github.com/users/kim2214/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kim2214/subscriptions","organizations_url":"https://api.github.com/users/kim2214/orgs","repos_url":"https://api.github.com/users/kim2214/repos","events_url":"https://api.github.com/users/kim2214/events{/privacy}","received_events_url":"https://api.github.com/users/kim2214/received_events","type":"User","site_admin":false},"body":"# ステップ1９: ユーザにロールを追加しよう\r\n- ユーザに管理ユーザと一般ユーザを区別するようにしてみましょう\r\n- 管理ユーザだけがユーザ管理画面にアクセスできるようにしてみましょう\r\n- ユーザ管理画面でロールを選択できるようにしましょう\r\n- 管理ユーザが1人もいなくならないように削除の制御をしましょう\r\n- ※ Gemの使用・不使用は自由です\r\n# 行ったこと\r\n- ユーザの権限を把握するためにroleカラム追加\r\n- 管理者だけユーザ一覧に接近できるように制御\r\n- 管理者が少なくとも一人がいるように実装\r\n- ユーザ登録・更新の時管理者だけできるように実装\r\n- ユーザフィーチャスペック修正\r\n- 便利のためにホームボタンを追加","created_at":"2018-10-29T08:42:37Z","updated_at":"2018-11-01T02:56:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2f2af19601650c3549803dd7e7f9904ef3ce31a","assignee":{"login":"kim2214","id":17827803,"node_id":"MDQ6VXNlcjE3ODI3ODAz","avatar_url":"https://avatars0.githubusercontent.com/u/17827803?v=4","gravatar_id":"","url":"https://api.github.com/users/kim2214","html_url":"https://github.com/kim2214","followers_url":"https://api.github.com/users/kim2214/followers","following_url":"https://api.github.com/users/kim2214/following{/other_user}","gists_url":"https://api.github.com/users/kim2214/gists{/gist_id}","starred_url":"https://api.github.com/users/kim2214/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kim2214/subscriptions","organizations_url":"https://api.github.com/users/kim2214/orgs","repos_url":"https://api.github.com/users/kim2214/repos","events_url":"https://api.github.com/users/kim2214/events{/privacy}","received_events_url":"https://api.github.com/users/kim2214/received_events","type":"User","site_admin":false},"assignees":[{"login":"kim2214","id":17827803,"node_id":"MDQ6VXNlcjE3ODI3ODAz","avatar_url":"https://avatars0.githubusercontent.com/u/17827803?v=4","gravatar_id":"","url":"https://api.github.com/users/kim2214","html_url":"https://github.com/kim2214","followers_url":"https://api.github.com/users/kim2214/followers","following_url":"https://api.github.com/users/kim2214/following{/other_user}","gists_url":"https://api.github.com/users/kim2214/gists{/gist_id}","starred_url":"https://api.github.com/users/kim2214/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kim2214/subscriptions","organizations_url":"https://api.github.com/users/kim2214/orgs","repos_url":"https://api.github.com/users/kim2214/repos","events_url":"https://api.github.com/users/kim2214/events{/privacy}","received_events_url":"https://api.github.com/users/kim2214/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Fablic/training/pulls/192/commits","review_comments_url":"https://api.github.com/repos/Fablic/training/pulls/192/comments","review_comment_url":"https://api.github.com/repos/Fablic/training/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Fablic/training/issues/192/comments","statuses_url":"https://api.github.com/repos/Fablic/training/statuses/c7a0a837d3401245b5610412ec5c3fcfa8f26a9e","head":{"label":"Fablic:kyusoo_step19","ref":"kyusoo_step19","sha":"c7a0a837d3401245b5610412ec5c3fcfa8f26a9e","user":{"login":"Fablic","id":2552314,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTIzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2552314?v=4","gravatar_id":"","url":"https://api.github.com/users/Fablic","html_url":"https://github.com/Fablic","followers_url":"https://api.github.com/users/Fablic/followers","following_url":"https://api.github.com/users/Fablic/following{/other_user}","gists_url":"https://api.github.com/users/Fablic/gists{/gist_id}","starred_url":"https://api.github.com/users/Fablic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fablic/subscriptions","organizations_url":"https://api.github.com/users/Fablic/orgs","repos_url":"https://api.github.com/users/Fablic/repos","events_url":"https://api.github.com/users/Fablic/events{/privacy}","received_events_url":"https://api.github.com/users/Fablic/received_events","type":"Organization","site_admin":false},"repo":{"id":112158106,"node_id":"MDEwOlJlcG9zaXRvcnkxMTIxNTgxMDY=","name":"training","full_name":"Fablic/training","private":false,"owner":{"login":"Fablic","id":2552314,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTIzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2552314?v=4","gravatar_id":"","url":"https://api.github.com/users/Fablic","html_url":"https://github.com/Fablic","followers_url":"https://api.github.com/users/Fablic/followers","following_url":"https://api.github.com/users/Fablic/following{/other_user}","gists_url":"https://api.github.com/users/Fablic/gists{/gist_id}","starred_url":"https://api.github.com/users/Fablic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fablic/subscriptions","organizations_url":"https://api.github.com/users/Fablic/orgs","repos_url":"https://api.github.com/users/Fablic/repos","events_url":"https://api.github.com/users/Fablic/events{/privacy}","received_events_url":"https://api.github.com/users/Fablic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Fablic/training","description":"株式会社Fablicの新入社員教育用カリキュラム","fork":true,"url":"https://api.github.com/repos/Fablic/training","forks_url":"https://api.github.com/repos/Fablic/training/forks","keys_url":"https://api.github.com/repos/Fablic/training/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fablic/training/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fablic/training/teams","hooks_url":"https://api.github.com/repos/Fablic/training/hooks","issue_events_url":"https://api.github.com/repos/Fablic/training/issues/events{/number}","events_url":"https://api.github.com/repos/Fablic/training/events","assignees_url":"https://api.github.com/repos/Fablic/training/assignees{/user}","branches_url":"https://api.github.com/repos/Fablic/training/branches{/branch}","tags_url":"https://api.github.com/repos/Fablic/training/tags","blobs_url":"https://api.github.com/repos/Fablic/training/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fablic/training/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fablic/training/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fablic/training/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fablic/training/statuses/{sha}","languages_url":"https://api.github.com/repos/Fablic/training/languages","stargazers_url":"https://api.github.com/repos/Fablic/training/stargazers","contributors_url":"https://api.github.com/repos/Fablic/training/contributors","subscribers_url":"https://api.github.com/repos/Fablic/training/subscribers","subscription_url":"https://api.github.com/repos/Fablic/training/subscription","commits_url":"https://api.github.com/repos/Fablic/training/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fablic/training/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fablic/training/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fablic/training/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fablic/training/contents/{+path}","compare_url":"https://api.github.com/repos/Fablic/training/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fablic/training/merges","archive_url":"https://api.github.com/repos/Fablic/training/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fablic/training/downloads","issues_url":"https://api.github.com/repos/Fablic/training/issues{/number}","pulls_url":"https://api.github.com/repos/Fablic/training/pulls{/number}","milestones_url":"https://api.github.com/repos/Fablic/training/milestones{/number}","notifications_url":"https://api.github.com/repos/Fablic/training/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fablic/training/labels{/name}","releases_url":"https://api.github.com/repos/Fablic/training/releases{/id}","deployments_url":"https://api.github.com/repos/Fablic/training/deployments","created_at":"2017-11-27T06:40:26Z","updated_at":"2018-10-10T09:29:54Z","pushed_at":"2018-11-01T02:27:50Z","git_url":"git://github.com/Fablic/training.git","ssh_url":"git@github.com:Fablic/training.git","clone_url":"https://github.com/Fablic/training.git","svn_url":"https://github.com/Fablic/training","homepage":"","size":36039,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"Fablic:kyusoo_kim","ref":"kyusoo_kim","sha":"f92ebbeace848dc460d506b9734e17e07f62a70c","user":{"login":"Fablic","id":2552314,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTIzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2552314?v=4","gravatar_id":"","url":"https://api.github.com/users/Fablic","html_url":"https://github.com/Fablic","followers_url":"https://api.github.com/users/Fablic/followers","following_url":"https://api.github.com/users/Fablic/following{/other_user}","gists_url":"https://api.github.com/users/Fablic/gists{/gist_id}","starred_url":"https://api.github.com/users/Fablic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fablic/subscriptions","organizations_url":"https://api.github.com/users/Fablic/orgs","repos_url":"https://api.github.com/users/Fablic/repos","events_url":"https://api.github.com/users/Fablic/events{/privacy}","received_events_url":"https://api.github.com/users/Fablic/received_events","type":"Organization","site_admin":false},"repo":{"id":112158106,"node_id":"MDEwOlJlcG9zaXRvcnkxMTIxNTgxMDY=","name":"training","full_name":"Fablic/training","private":false,"owner":{"login":"Fablic","id":2552314,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTIzMTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2552314?v=4","gravatar_id":"","url":"https://api.github.com/users/Fablic","html_url":"https://github.com/Fablic","followers_url":"https://api.github.com/users/Fablic/followers","following_url":"https://api.github.com/users/Fablic/following{/other_user}","gists_url":"https://api.github.com/users/Fablic/gists{/gist_id}","starred_url":"https://api.github.com/users/Fablic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fablic/subscriptions","organizations_url":"https://api.github.com/users/Fablic/orgs","repos_url":"https://api.github.com/users/Fablic/repos","events_url":"https://api.github.com/users/Fablic/events{/privacy}","received_events_url":"https://api.github.com/users/Fablic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Fablic/training","description":"株式会社Fablicの新入社員教育用カリキュラム","fork":true,"url":"https://api.github.com/repos/Fablic/training","forks_url":"https://api.github.com/repos/Fablic/training/forks","keys_url":"https://api.github.com/repos/Fablic/training/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fablic/training/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fablic/training/teams","hooks_url":"https://api.github.com/repos/Fablic/training/hooks","issue_events_url":"https://api.github.com/repos/Fablic/training/issues/events{/number}","events_url":"https://api.github.com/repos/Fablic/training/events","assignees_url":"https://api.github.com/repos/Fablic/training/assignees{/user}","branches_url":"https://api.github.com/repos/Fablic/training/branches{/branch}","tags_url":"https://api.github.com/repos/Fablic/training/tags","blobs_url":"https://api.github.com/repos/Fablic/training/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fablic/training/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fablic/training/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fablic/training/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fablic/training/statuses/{sha}","languages_url":"https://api.github.com/repos/Fablic/training/languages","stargazers_url":"https://api.github.com/repos/Fablic/training/stargazers","contributors_url":"https://api.github.com/repos/Fablic/training/contributors","subscribers_url":"https://api.github.com/repos/Fablic/training/subscribers","subscription_url":"https://api.github.com/repos/Fablic/training/subscription","commits_url":"https://api.github.com/repos/Fablic/training/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fablic/training/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fablic/training/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fablic/training/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fablic/training/contents/{+path}","compare_url":"https://api.github.com/repos/Fablic/training/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fablic/training/merges","archive_url":"https://api.github.com/repos/Fablic/training/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fablic/training/downloads","issues_url":"https://api.github.com/repos/Fablic/training/issues{/number}","pulls_url":"https://api.github.com/repos/Fablic/training/pulls{/number}","milestones_url":"https://api.github.com/repos/Fablic/training/milestones{/number}","notifications_url":"https://api.github.com/repos/Fablic/training/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fablic/training/labels{/name}","releases_url":"https://api.github.com/repos/Fablic/training/releases{/id}","deployments_url":"https://api.github.com/repos/Fablic/training/deployments","created_at":"2017-11-27T06:40:26Z","updated_at":"2018-10-10T09:29:54Z","pushed_at":"2018-11-01T02:27:50Z","git_url":"git://github.com/Fablic/training.git","ssh_url":"git@github.com:Fablic/training.git","clone_url":"https://github.com/Fablic/training.git","svn_url":"https://github.com/Fablic/training","homepage":"","size":36039,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Fablic/training/pulls/192"},"html":{"href":"https://github.com/Fablic/training/pull/192"},"issue":{"href":"https://api.github.com/repos/Fablic/training/issues/192"},"comments":{"href":"https://api.github.com/repos/Fablic/training/issues/192/comments"},"review_comments":{"href":"https://api.github.com/repos/Fablic/training/pulls/192/comments"},"review_comment":{"href":"https://api.github.com/repos/Fablic/training/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Fablic/training/pulls/192/commits"},"statuses":{"href":"https://api.github.com/repos/Fablic/training/statuses/c7a0a837d3401245b5610412ec5c3fcfa8f26a9e"}},"author_association":"NONE"}}
{"actor":{"display_login":"kim2214"}}