{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/facia-tool/pulls/comments/44947427","id":44947427,"diff_hunk":"@@ -0,0 +1,51 @@\n+package utils\n+\n+import com.gu.editorial.permissions.client.{PermissionDenied, PermissionGranted, Permission, PermissionsUser}\n+import permissions.Permissions\n+import play.api.Logger\n+import play.api.libs.json.{JsBoolean, JsValue, Json, Writes}\n+import switchboard.SwitchManager\n+import scala.concurrent.Future\n+import scala.concurrent.ExecutionContext.Implicits.global\n+\n+object Authorization {\n+  implicit val authorizationWrites = new Writes[Authorization] {\n+    def writes(access: Authorization): JsValue = access match {\n+      case AccessGranted => JsBoolean(true)\n+      case AccessDenied => JsBoolean(false)}}}","path":"facia-tool/app/util/Acl.scala","position":15,"original_position":15,"commit_id":"014359af0ba443b1cca826a00f70bad9d5484d33","original_commit_id":"014359af0ba443b1cca826a00f70bad9d5484d33","user":{"login":"janua","id":445472,"avatar_url":"https://avatars.githubusercontent.com/u/445472?v=3","gravatar_id":"","url":"https://api.github.com/users/janua","html_url":"https://github.com/janua","followers_url":"https://api.github.com/users/janua/followers","following_url":"https://api.github.com/users/janua/following{/other_user}","gists_url":"https://api.github.com/users/janua/gists{/gist_id}","starred_url":"https://api.github.com/users/janua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janua/subscriptions","organizations_url":"https://api.github.com/users/janua/orgs","repos_url":"https://api.github.com/users/janua/repos","events_url":"https://api.github.com/users/janua/events{/privacy}","received_events_url":"https://api.github.com/users/janua/received_events","type":"User","site_admin":false},"body":":smile: ","created_at":"2015-11-16T16:41:39Z","updated_at":"2015-11-16T16:41:39Z","html_url":"https://github.com/guardian/facia-tool/pull/65#discussion_r44947427","pull_request_url":"https://api.github.com/repos/guardian/facia-tool/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/guardian/facia-tool/pulls/comments/44947427"},"html":{"href":"https://github.com/guardian/facia-tool/pull/65#discussion_r44947427"},"pull_request":{"href":"https://api.github.com/repos/guardian/facia-tool/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/facia-tool/pulls/65","id":50832844,"html_url":"https://github.com/guardian/facia-tool/pull/65","diff_url":"https://github.com/guardian/facia-tool/pull/65.diff","patch_url":"https://github.com/guardian/facia-tool/pull/65.patch","issue_url":"https://api.github.com/repos/guardian/facia-tool/issues/65","number":65,"state":"open","locked":false,"title":"Permissions for breaking news","user":{"login":"piuccio","id":680284,"avatar_url":"https://avatars.githubusercontent.com/u/680284?v=3","gravatar_id":"","url":"https://api.github.com/users/piuccio","html_url":"https://github.com/piuccio","followers_url":"https://api.github.com/users/piuccio/followers","following_url":"https://api.github.com/users/piuccio/following{/other_user}","gists_url":"https://api.github.com/users/piuccio/gists{/gist_id}","starred_url":"https://api.github.com/users/piuccio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piuccio/subscriptions","organizations_url":"https://api.github.com/users/piuccio/orgs","repos_url":"https://api.github.com/users/piuccio/repos","events_url":"https://api.github.com/users/piuccio/events{/privacy}","received_events_url":"https://api.github.com/users/piuccio/received_events","type":"User","site_admin":false},"body":"The ability to modify collections inside `breaking-news` front is now controlled by a permission in permissions API and a switch in the switchboard\r\n\r\n@janua ","created_at":"2015-11-16T16:33:38Z","updated_at":"2015-11-16T16:41:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e370e4d0b965a8aa7213df347d32d054a0eae0cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/facia-tool/pulls/65/commits","review_comments_url":"https://api.github.com/repos/guardian/facia-tool/pulls/65/comments","review_comment_url":"https://api.github.com/repos/guardian/facia-tool/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/facia-tool/issues/65/comments","statuses_url":"https://api.github.com/repos/guardian/facia-tool/statuses/014359af0ba443b1cca826a00f70bad9d5484d33","head":{"label":"guardian:breaking-news","ref":"breaking-news","sha":"014359af0ba443b1cca826a00f70bad9d5484d33","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":40353770,"name":"facia-tool","full_name":"guardian/facia-tool","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/facia-tool","description":"Guardian front pages editor","fork":false,"url":"https://api.github.com/repos/guardian/facia-tool","forks_url":"https://api.github.com/repos/guardian/facia-tool/forks","keys_url":"https://api.github.com/repos/guardian/facia-tool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/facia-tool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/facia-tool/teams","hooks_url":"https://api.github.com/repos/guardian/facia-tool/hooks","issue_events_url":"https://api.github.com/repos/guardian/facia-tool/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/facia-tool/events","assignees_url":"https://api.github.com/repos/guardian/facia-tool/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/facia-tool/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/facia-tool/tags","blobs_url":"https://api.github.com/repos/guardian/facia-tool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/facia-tool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/facia-tool/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/facia-tool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/facia-tool/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/facia-tool/languages","stargazers_url":"https://api.github.com/repos/guardian/facia-tool/stargazers","contributors_url":"https://api.github.com/repos/guardian/facia-tool/contributors","subscribers_url":"https://api.github.com/repos/guardian/facia-tool/subscribers","subscription_url":"https://api.github.com/repos/guardian/facia-tool/subscription","commits_url":"https://api.github.com/repos/guardian/facia-tool/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/facia-tool/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/facia-tool/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/facia-tool/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/facia-tool/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/facia-tool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/facia-tool/merges","archive_url":"https://api.github.com/repos/guardian/facia-tool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/facia-tool/downloads","issues_url":"https://api.github.com/repos/guardian/facia-tool/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/facia-tool/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/facia-tool/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/facia-tool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/facia-tool/labels{/name}","releases_url":"https://api.github.com/repos/guardian/facia-tool/releases{/id}","created_at":"2015-08-07T09:54:57Z","updated_at":"2015-11-14T23:26:21Z","pushed_at":"2015-11-16T16:33:39Z","git_url":"git://github.com/guardian/facia-tool.git","ssh_url":"git@github.com:guardian/facia-tool.git","clone_url":"https://github.com/guardian/facia-tool.git","svn_url":"https://github.com/guardian/facia-tool","homepage":null,"size":345375,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":2,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"df00ff699d2f4652293fcf90a8f2afd08cfbb9bd","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":40353770,"name":"facia-tool","full_name":"guardian/facia-tool","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/facia-tool","description":"Guardian front pages editor","fork":false,"url":"https://api.github.com/repos/guardian/facia-tool","forks_url":"https://api.github.com/repos/guardian/facia-tool/forks","keys_url":"https://api.github.com/repos/guardian/facia-tool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/facia-tool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/facia-tool/teams","hooks_url":"https://api.github.com/repos/guardian/facia-tool/hooks","issue_events_url":"https://api.github.com/repos/guardian/facia-tool/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/facia-tool/events","assignees_url":"https://api.github.com/repos/guardian/facia-tool/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/facia-tool/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/facia-tool/tags","blobs_url":"https://api.github.com/repos/guardian/facia-tool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/facia-tool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/facia-tool/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/facia-tool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/facia-tool/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/facia-tool/languages","stargazers_url":"https://api.github.com/repos/guardian/facia-tool/stargazers","contributors_url":"https://api.github.com/repos/guardian/facia-tool/contributors","subscribers_url":"https://api.github.com/repos/guardian/facia-tool/subscribers","subscription_url":"https://api.github.com/repos/guardian/facia-tool/subscription","commits_url":"https://api.github.com/repos/guardian/facia-tool/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/facia-tool/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/facia-tool/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/facia-tool/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/facia-tool/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/facia-tool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/facia-tool/merges","archive_url":"https://api.github.com/repos/guardian/facia-tool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/facia-tool/downloads","issues_url":"https://api.github.com/repos/guardian/facia-tool/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/facia-tool/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/facia-tool/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/facia-tool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/facia-tool/labels{/name}","releases_url":"https://api.github.com/repos/guardian/facia-tool/releases{/id}","created_at":"2015-08-07T09:54:57Z","updated_at":"2015-11-14T23:26:21Z","pushed_at":"2015-11-16T16:33:39Z","git_url":"git://github.com/guardian/facia-tool.git","ssh_url":"git@github.com:guardian/facia-tool.git","clone_url":"https://github.com/guardian/facia-tool.git","svn_url":"https://github.com/guardian/facia-tool","homepage":null,"size":345375,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/facia-tool/pulls/65"},"html":{"href":"https://github.com/guardian/facia-tool/pull/65"},"issue":{"href":"https://api.github.com/repos/guardian/facia-tool/issues/65"},"comments":{"href":"https://api.github.com/repos/guardian/facia-tool/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/facia-tool/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/facia-tool/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/facia-tool/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/facia-tool/statuses/014359af0ba443b1cca826a00f70bad9d5484d33"}}}}