{"action":"created","comment":{"url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/comments/82492853","pull_request_review_id":3400028,"id":82492853,"diff_hunk":"@@ -8,6 +8,7 @@ defmodule CodeCorps.OrganizationPolicy do\n   def create?(%User{admin: true}), do: true\n   def create?(%User{admin: false}), do: false\n \n+  def update?(%User{admin: true}, %Organization{}), do: true\n   def update?(%User{} = user, %Organization{} = organization), do: user |> role_is_at_least_admin(organization)","path":"web/policies/organization_policy.ex","position":5,"original_position":5,"commit_id":"6058787adf3a3aee16d69fd1d164750df3070e8a","original_commit_id":"049ce6fd571e0e54620cc334e837d405cd78b185","user":{"login":"JoshSmith","id":321667,"avatar_url":"https://avatars.githubusercontent.com/u/321667?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshSmith","html_url":"https://github.com/JoshSmith","followers_url":"https://api.github.com/users/JoshSmith/followers","following_url":"https://api.github.com/users/JoshSmith/following{/other_user}","gists_url":"https://api.github.com/users/JoshSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshSmith/subscriptions","organizations_url":"https://api.github.com/users/JoshSmith/orgs","repos_url":"https://api.github.com/users/JoshSmith/repos","events_url":"https://api.github.com/users/JoshSmith/events{/privacy}","received_events_url":"https://api.github.com/users/JoshSmith/received_events","type":"User","site_admin":false},"body":"@sbatson5 I think it will return false if the role's not at least an admin.","created_at":"2016-10-08T01:57:32Z","updated_at":"2016-10-08T01:57:32Z","html_url":"https://github.com/code-corps/code-corps-api/pull/327#discussion_r82492853","pull_request_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/327","_links":{"self":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/comments/82492853"},"html":{"href":"https://github.com/code-corps/code-corps-api/pull/327#discussion_r82492853"},"pull_request":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/327"}}},"pull_request":{"url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/327","id":88528457,"html_url":"https://github.com/code-corps/code-corps-api/pull/327","diff_url":"https://github.com/code-corps/code-corps-api/pull/327.diff","patch_url":"https://github.com/code-corps/code-corps-api/pull/327.patch","issue_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/327","number":327,"state":"open","locked":false,"title":"Add remaining policy tests","user":{"login":"JoshSmith","id":321667,"avatar_url":"https://avatars.githubusercontent.com/u/321667?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshSmith","html_url":"https://github.com/JoshSmith","followers_url":"https://api.github.com/users/JoshSmith/followers","following_url":"https://api.github.com/users/JoshSmith/following{/other_user}","gists_url":"https://api.github.com/users/JoshSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshSmith/subscriptions","organizations_url":"https://api.github.com/users/JoshSmith/orgs","repos_url":"https://api.github.com/users/JoshSmith/repos","events_url":"https://api.github.com/users/JoshSmith/events{/privacy}","received_events_url":"https://api.github.com/users/JoshSmith/received_events","type":"User","site_admin":false},"body":"Closes #174 by adding the remaining policy tests not addressed in #320.\r\n\r\n- Add category policy test\r\n- Add role policy test\r\n- Add skill policy test\r\n- Add role skill policy test\r\n- Add comment policy test\r\n- Add preview policy test\r\n- Add user policy test\r\n- Add organization policy test\r\n- Update abilities","created_at":"2016-10-08T01:13:03Z","updated_at":"2016-10-08T01:57:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fb5611b7bc0d606a93863aa24bd0b6a8d18a5773","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/327/commits","review_comments_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/327/comments","review_comment_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/327/comments","statuses_url":"https://api.github.com/repos/code-corps/code-corps-api/statuses/6058787adf3a3aee16d69fd1d164750df3070e8a","head":{"label":"code-corps:174-update-policy-tests","ref":"174-update-policy-tests","sha":"6058787adf3a3aee16d69fd1d164750df3070e8a","user":{"login":"code-corps","id":12991115,"avatar_url":"https://avatars.githubusercontent.com/u/12991115?v=3","gravatar_id":"","url":"https://api.github.com/users/code-corps","html_url":"https://github.com/code-corps","followers_url":"https://api.github.com/users/code-corps/followers","following_url":"https://api.github.com/users/code-corps/following{/other_user}","gists_url":"https://api.github.com/users/code-corps/gists{/gist_id}","starred_url":"https://api.github.com/users/code-corps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-corps/subscriptions","organizations_url":"https://api.github.com/users/code-corps/orgs","repos_url":"https://api.github.com/users/code-corps/repos","events_url":"https://api.github.com/users/code-corps/events{/privacy}","received_events_url":"https://api.github.com/users/code-corps/received_events","type":"Organization","site_admin":false},"repo":{"id":63497734,"name":"code-corps-api","full_name":"code-corps/code-corps-api","owner":{"login":"code-corps","id":12991115,"avatar_url":"https://avatars.githubusercontent.com/u/12991115?v=3","gravatar_id":"","url":"https://api.github.com/users/code-corps","html_url":"https://github.com/code-corps","followers_url":"https://api.github.com/users/code-corps/followers","following_url":"https://api.github.com/users/code-corps/following{/other_user}","gists_url":"https://api.github.com/users/code-corps/gists{/gist_id}","starred_url":"https://api.github.com/users/code-corps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-corps/subscriptions","organizations_url":"https://api.github.com/users/code-corps/orgs","repos_url":"https://api.github.com/users/code-corps/repos","events_url":"https://api.github.com/users/code-corps/events{/privacy}","received_events_url":"https://api.github.com/users/code-corps/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-corps/code-corps-api","description":"Elixir/Phoenix API for Code Corps.","fork":false,"url":"https://api.github.com/repos/code-corps/code-corps-api","forks_url":"https://api.github.com/repos/code-corps/code-corps-api/forks","keys_url":"https://api.github.com/repos/code-corps/code-corps-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-corps/code-corps-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-corps/code-corps-api/teams","hooks_url":"https://api.github.com/repos/code-corps/code-corps-api/hooks","issue_events_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/events{/number}","events_url":"https://api.github.com/repos/code-corps/code-corps-api/events","assignees_url":"https://api.github.com/repos/code-corps/code-corps-api/assignees{/user}","branches_url":"https://api.github.com/repos/code-corps/code-corps-api/branches{/branch}","tags_url":"https://api.github.com/repos/code-corps/code-corps-api/tags","blobs_url":"https://api.github.com/repos/code-corps/code-corps-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-corps/code-corps-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-corps/code-corps-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-corps/code-corps-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-corps/code-corps-api/statuses/{sha}","languages_url":"https://api.github.com/repos/code-corps/code-corps-api/languages","stargazers_url":"https://api.github.com/repos/code-corps/code-corps-api/stargazers","contributors_url":"https://api.github.com/repos/code-corps/code-corps-api/contributors","subscribers_url":"https://api.github.com/repos/code-corps/code-corps-api/subscribers","subscription_url":"https://api.github.com/repos/code-corps/code-corps-api/subscription","commits_url":"https://api.github.com/repos/code-corps/code-corps-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-corps/code-corps-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-corps/code-corps-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-corps/code-corps-api/contents/{+path}","compare_url":"https://api.github.com/repos/code-corps/code-corps-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-corps/code-corps-api/merges","archive_url":"https://api.github.com/repos/code-corps/code-corps-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-corps/code-corps-api/downloads","issues_url":"https://api.github.com/repos/code-corps/code-corps-api/issues{/number}","pulls_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls{/number}","milestones_url":"https://api.github.com/repos/code-corps/code-corps-api/milestones{/number}","notifications_url":"https://api.github.com/repos/code-corps/code-corps-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-corps/code-corps-api/labels{/name}","releases_url":"https://api.github.com/repos/code-corps/code-corps-api/releases{/id}","deployments_url":"https://api.github.com/repos/code-corps/code-corps-api/deployments","created_at":"2016-07-16T18:49:25Z","updated_at":"2016-10-07T11:29:13Z","pushed_at":"2016-10-08T01:55:49Z","git_url":"git://github.com/code-corps/code-corps-api.git","ssh_url":"git@github.com:code-corps/code-corps-api.git","clone_url":"https://github.com/code-corps/code-corps-api.git","svn_url":"https://github.com/code-corps/code-corps-api","homepage":"https://www.codecorps.org","size":563,"stargazers_count":57,"watchers_count":57,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":67,"forks":16,"open_issues":67,"watchers":57,"default_branch":"develop"}},"base":{"label":"code-corps:develop","ref":"develop","sha":"15251e112ade96aabb3439b6b949a7fd7bd7210e","user":{"login":"code-corps","id":12991115,"avatar_url":"https://avatars.githubusercontent.com/u/12991115?v=3","gravatar_id":"","url":"https://api.github.com/users/code-corps","html_url":"https://github.com/code-corps","followers_url":"https://api.github.com/users/code-corps/followers","following_url":"https://api.github.com/users/code-corps/following{/other_user}","gists_url":"https://api.github.com/users/code-corps/gists{/gist_id}","starred_url":"https://api.github.com/users/code-corps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-corps/subscriptions","organizations_url":"https://api.github.com/users/code-corps/orgs","repos_url":"https://api.github.com/users/code-corps/repos","events_url":"https://api.github.com/users/code-corps/events{/privacy}","received_events_url":"https://api.github.com/users/code-corps/received_events","type":"Organization","site_admin":false},"repo":{"id":63497734,"name":"code-corps-api","full_name":"code-corps/code-corps-api","owner":{"login":"code-corps","id":12991115,"avatar_url":"https://avatars.githubusercontent.com/u/12991115?v=3","gravatar_id":"","url":"https://api.github.com/users/code-corps","html_url":"https://github.com/code-corps","followers_url":"https://api.github.com/users/code-corps/followers","following_url":"https://api.github.com/users/code-corps/following{/other_user}","gists_url":"https://api.github.com/users/code-corps/gists{/gist_id}","starred_url":"https://api.github.com/users/code-corps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-corps/subscriptions","organizations_url":"https://api.github.com/users/code-corps/orgs","repos_url":"https://api.github.com/users/code-corps/repos","events_url":"https://api.github.com/users/code-corps/events{/privacy}","received_events_url":"https://api.github.com/users/code-corps/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-corps/code-corps-api","description":"Elixir/Phoenix API for Code Corps.","fork":false,"url":"https://api.github.com/repos/code-corps/code-corps-api","forks_url":"https://api.github.com/repos/code-corps/code-corps-api/forks","keys_url":"https://api.github.com/repos/code-corps/code-corps-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-corps/code-corps-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-corps/code-corps-api/teams","hooks_url":"https://api.github.com/repos/code-corps/code-corps-api/hooks","issue_events_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/events{/number}","events_url":"https://api.github.com/repos/code-corps/code-corps-api/events","assignees_url":"https://api.github.com/repos/code-corps/code-corps-api/assignees{/user}","branches_url":"https://api.github.com/repos/code-corps/code-corps-api/branches{/branch}","tags_url":"https://api.github.com/repos/code-corps/code-corps-api/tags","blobs_url":"https://api.github.com/repos/code-corps/code-corps-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-corps/code-corps-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-corps/code-corps-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-corps/code-corps-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-corps/code-corps-api/statuses/{sha}","languages_url":"https://api.github.com/repos/code-corps/code-corps-api/languages","stargazers_url":"https://api.github.com/repos/code-corps/code-corps-api/stargazers","contributors_url":"https://api.github.com/repos/code-corps/code-corps-api/contributors","subscribers_url":"https://api.github.com/repos/code-corps/code-corps-api/subscribers","subscription_url":"https://api.github.com/repos/code-corps/code-corps-api/subscription","commits_url":"https://api.github.com/repos/code-corps/code-corps-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-corps/code-corps-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-corps/code-corps-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-corps/code-corps-api/contents/{+path}","compare_url":"https://api.github.com/repos/code-corps/code-corps-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-corps/code-corps-api/merges","archive_url":"https://api.github.com/repos/code-corps/code-corps-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-corps/code-corps-api/downloads","issues_url":"https://api.github.com/repos/code-corps/code-corps-api/issues{/number}","pulls_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls{/number}","milestones_url":"https://api.github.com/repos/code-corps/code-corps-api/milestones{/number}","notifications_url":"https://api.github.com/repos/code-corps/code-corps-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-corps/code-corps-api/labels{/name}","releases_url":"https://api.github.com/repos/code-corps/code-corps-api/releases{/id}","deployments_url":"https://api.github.com/repos/code-corps/code-corps-api/deployments","created_at":"2016-07-16T18:49:25Z","updated_at":"2016-10-07T11:29:13Z","pushed_at":"2016-10-08T01:55:49Z","git_url":"git://github.com/code-corps/code-corps-api.git","ssh_url":"git@github.com:code-corps/code-corps-api.git","clone_url":"https://github.com/code-corps/code-corps-api.git","svn_url":"https://github.com/code-corps/code-corps-api","homepage":"https://www.codecorps.org","size":563,"stargazers_count":57,"watchers_count":57,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":67,"forks":16,"open_issues":67,"watchers":57,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/327"},"html":{"href":"https://github.com/code-corps/code-corps-api/pull/327"},"issue":{"href":"https://api.github.com/repos/code-corps/code-corps-api/issues/327"},"comments":{"href":"https://api.github.com/repos/code-corps/code-corps-api/issues/327/comments"},"review_comments":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/327/comments"},"review_comment":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/327/commits"},"statuses":{"href":"https://api.github.com/repos/code-corps/code-corps-api/statuses/6058787adf3a3aee16d69fd1d164750df3070e8a"}}}}
{"actor":{"display_login":"JoshSmith"}}