{"action":"created","comment":{"url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/comments/93885735","pull_request_review_id":14418040,"id":93885735,"diff_hunk":"@@ -8,12 +8,11 @@ h1 New Vasjuky Project\n       |Name:  #{current_user.name}\n     li\n       |Email: #{current_user.email}\n-  br/\n+\n   = link_to('Logout', destroy_user_session_path, :method => :delete)\n \n-- if current_user && current_user.admin?\n-  br/\n-  br/\n+- if current_user && (current_user.admin? || current_user.moderator?)","path":"app/views/home/index.slim","position":11,"original_position":11,"commit_id":"cd6cccdb37f59431dfa44b2f7bf66641b1669272","original_commit_id":"4617173e3c14e5eb1cda3688412dd6f2b4c1db10","user":{"login":"igorkasyanchuk","id":11101,"avatar_url":"https://avatars.githubusercontent.com/u/11101?v=3","gravatar_id":"","url":"https://api.github.com/users/igorkasyanchuk","html_url":"https://github.com/igorkasyanchuk","followers_url":"https://api.github.com/users/igorkasyanchuk/followers","following_url":"https://api.github.com/users/igorkasyanchuk/following{/other_user}","gists_url":"https://api.github.com/users/igorkasyanchuk/gists{/gist_id}","starred_url":"https://api.github.com/users/igorkasyanchuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorkasyanchuk/subscriptions","organizations_url":"https://api.github.com/users/igorkasyanchuk/orgs","repos_url":"https://api.github.com/users/igorkasyanchuk/repos","events_url":"https://api.github.com/users/igorkasyanchuk/events{/privacy}","received_events_url":"https://api.github.com/users/igorkasyanchuk/received_events","type":"User","site_admin":false},"body":"create helpers\r\n\r\n```\r\ndef admin_or_moderator?\r\n  current_user && (current_user.admin? || current_user.moderator?)\r\nend\r\n```\r\n\r\nand use in many places. + `admin?`","created_at":"2016-12-26T22:08:05Z","updated_at":"2016-12-26T22:09:57Z","html_url":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky/pull/43#discussion_r93885735","pull_request_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/comments/93885735"},"html":{"href":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky/pull/43#discussion_r93885735"},"pull_request":{"href":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/43","id":99392110,"html_url":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky/pull/43","diff_url":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky/pull/43.diff","patch_url":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky/pull/43.patch","issue_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/issues/43","number":43,"state":"open","locked":false,"title":"#37 Admin can change roles of users","user":{"login":"mrkava","id":18073124,"avatar_url":"https://avatars.githubusercontent.com/u/18073124?v=3","gravatar_id":"","url":"https://api.github.com/users/mrkava","html_url":"https://github.com/mrkava","followers_url":"https://api.github.com/users/mrkava/followers","following_url":"https://api.github.com/users/mrkava/following{/other_user}","gists_url":"https://api.github.com/users/mrkava/gists{/gist_id}","starred_url":"https://api.github.com/users/mrkava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrkava/subscriptions","organizations_url":"https://api.github.com/users/mrkava/orgs","repos_url":"https://api.github.com/users/mrkava/repos","events_url":"https://api.github.com/users/mrkava/events{/privacy}","received_events_url":"https://api.github.com/users/mrkava/received_events","type":"User","site_admin":false},"body":"Issue - https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky/issues/37\r\n\r\n- [ ] @Kmalynss \r\n- [ ] @TarasBardiuk \r\n- [ ] @igorkasyanchuk\r\n\r\n- Only admins and moderators can see list of users\r\n- Admins can change roles of another users from list of users: reporter could be promoted to moderator and backwards\r\n- Admin can not change role of another admin\r\n- Moderators see only roles in list of users, can not change roles\r\n- Rspecs added\r\n","created_at":"2016-12-26T21:59:36Z","updated_at":"2016-12-26T22:09:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad9da811b21bf5746f6868e5c87c2350326de4cc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/43/commits","review_comments_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/43/comments","review_comment_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/issues/43/comments","statuses_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/statuses/cd6cccdb37f59431dfa44b2f7bf66641b1669272","head":{"label":"Kotany-IF070-WebUI-RoR:37_admin_makes_moderators","ref":"37_admin_makes_moderators","sha":"cd6cccdb37f59431dfa44b2f7bf66641b1669272","user":{"login":"Kotany-IF070-WebUI-RoR","id":24547938,"avatar_url":"https://avatars.githubusercontent.com/u/24547938?v=3","gravatar_id":"","url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR","html_url":"https://github.com/Kotany-IF070-WebUI-RoR","followers_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/followers","following_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/following{/other_user}","gists_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/gists{/gist_id}","starred_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/subscriptions","organizations_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/orgs","repos_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/repos","events_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/events{/privacy}","received_events_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/received_events","type":"Organization","site_admin":false},"repo":{"id":76369589,"name":"NewVasjuky","full_name":"Kotany-IF070-WebUI-RoR/NewVasjuky","owner":{"login":"Kotany-IF070-WebUI-RoR","id":24547938,"avatar_url":"https://avatars.githubusercontent.com/u/24547938?v=3","gravatar_id":"","url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR","html_url":"https://github.com/Kotany-IF070-WebUI-RoR","followers_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/followers","following_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/following{/other_user}","gists_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/gists{/gist_id}","starred_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/subscriptions","organizations_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/orgs","repos_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/repos","events_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/events{/privacy}","received_events_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky","description":null,"fork":false,"url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky","forks_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/forks","keys_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/teams","hooks_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/hooks","issue_events_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/issues/events{/number}","events_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/events","assignees_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/assignees{/user}","branches_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/branches{/branch}","tags_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/tags","blobs_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/statuses/{sha}","languages_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/languages","stargazers_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/stargazers","contributors_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/contributors","subscribers_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/subscribers","subscription_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/subscription","commits_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/contents/{+path}","compare_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/merges","archive_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/downloads","issues_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/issues{/number}","pulls_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls{/number}","milestones_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/milestones{/number}","notifications_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/labels{/name}","releases_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/releases{/id}","deployments_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/deployments","created_at":"2016-12-13T15:08:23Z","updated_at":"2016-12-15T16:43:45Z","pushed_at":"2016-12-26T22:09:17Z","git_url":"git://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky.git","ssh_url":"git@github.com:Kotany-IF070-WebUI-RoR/NewVasjuky.git","clone_url":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky.git","svn_url":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky","homepage":null,"size":140,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":21,"forks":0,"open_issues":21,"watchers":0,"default_branch":"master"}},"base":{"label":"Kotany-IF070-WebUI-RoR:master","ref":"master","sha":"cd8511060787ea8e791d01d82ff75f031943342f","user":{"login":"Kotany-IF070-WebUI-RoR","id":24547938,"avatar_url":"https://avatars.githubusercontent.com/u/24547938?v=3","gravatar_id":"","url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR","html_url":"https://github.com/Kotany-IF070-WebUI-RoR","followers_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/followers","following_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/following{/other_user}","gists_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/gists{/gist_id}","starred_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/subscriptions","organizations_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/orgs","repos_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/repos","events_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/events{/privacy}","received_events_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/received_events","type":"Organization","site_admin":false},"repo":{"id":76369589,"name":"NewVasjuky","full_name":"Kotany-IF070-WebUI-RoR/NewVasjuky","owner":{"login":"Kotany-IF070-WebUI-RoR","id":24547938,"avatar_url":"https://avatars.githubusercontent.com/u/24547938?v=3","gravatar_id":"","url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR","html_url":"https://github.com/Kotany-IF070-WebUI-RoR","followers_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/followers","following_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/following{/other_user}","gists_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/gists{/gist_id}","starred_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/subscriptions","organizations_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/orgs","repos_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/repos","events_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/events{/privacy}","received_events_url":"https://api.github.com/users/Kotany-IF070-WebUI-RoR/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky","description":null,"fork":false,"url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky","forks_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/forks","keys_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/teams","hooks_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/hooks","issue_events_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/issues/events{/number}","events_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/events","assignees_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/assignees{/user}","branches_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/branches{/branch}","tags_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/tags","blobs_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/statuses/{sha}","languages_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/languages","stargazers_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/stargazers","contributors_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/contributors","subscribers_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/subscribers","subscription_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/subscription","commits_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/contents/{+path}","compare_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/merges","archive_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/downloads","issues_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/issues{/number}","pulls_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls{/number}","milestones_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/milestones{/number}","notifications_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/labels{/name}","releases_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/releases{/id}","deployments_url":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/deployments","created_at":"2016-12-13T15:08:23Z","updated_at":"2016-12-15T16:43:45Z","pushed_at":"2016-12-26T22:09:17Z","git_url":"git://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky.git","ssh_url":"git@github.com:Kotany-IF070-WebUI-RoR/NewVasjuky.git","clone_url":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky.git","svn_url":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky","homepage":null,"size":140,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":21,"forks":0,"open_issues":21,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/43"},"html":{"href":"https://github.com/Kotany-IF070-WebUI-RoR/NewVasjuky/pull/43"},"issue":{"href":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/issues/43"},"comments":{"href":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/Kotany-IF070-WebUI-RoR/NewVasjuky/statuses/cd6cccdb37f59431dfa44b2f7bf66641b1669272"}}}}
{"actor":{"display_login":"igorkasyanchuk"}}