{"action":"created","comment":{"url":"https://api.github.com/repos/zendesk/user_data_app/pulls/comments/34428518","id":34428518,"diff_hunk":"@@ -371,8 +386,12 @@\n \n     // REQUESTS ================================================================\n \n-    onGetCurrentUserLocaleDone: function(data) {\n-      this.locale = data.user.locale;\n+    onGetCustomRolesDone: function(data) {\n+      var roles = data[\"custom_roles\"];\n+      var role = _.find(roles, function(role) {\n+        role[\"id\"] == this.currentUser().role();","path":"app.js","position":71,"original_position":71,"commit_id":"c5d5ffd9af3c9abd68b3d13d9670d31b3dd24d8a","original_commit_id":"c5d5ffd9af3c9abd68b3d13d9670d31b3dd24d8a","user":{"login":"adammw","id":153219,"avatar_url":"https://avatars.githubusercontent.com/u/153219?v=3","gravatar_id":"","url":"https://api.github.com/users/adammw","html_url":"https://github.com/adammw","followers_url":"https://api.github.com/users/adammw/followers","following_url":"https://api.github.com/users/adammw/following{/other_user}","gists_url":"https://api.github.com/users/adammw/gists{/gist_id}","starred_url":"https://api.github.com/users/adammw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adammw/subscriptions","organizations_url":"https://api.github.com/users/adammw/orgs","repos_url":"https://api.github.com/users/adammw/repos","events_url":"https://api.github.com/users/adammw/events{/privacy}","received_events_url":"https://api.github.com/users/adammw/received_events","type":"User","site_admin":false},"body":"`role.id` ? Any reason for the `[]` syntax?","created_at":"2015-07-13T01:16:21Z","updated_at":"2015-07-13T01:16:21Z","html_url":"https://github.com/zendesk/user_data_app/pull/46#discussion_r34428518","pull_request_url":"https://api.github.com/repos/zendesk/user_data_app/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/zendesk/user_data_app/pulls/comments/34428518"},"html":{"href":"https://github.com/zendesk/user_data_app/pull/46#discussion_r34428518"},"pull_request":{"href":"https://api.github.com/repos/zendesk/user_data_app/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/zendesk/user_data_app/pulls/46","id":39772767,"html_url":"https://github.com/zendesk/user_data_app/pull/46","diff_url":"https://github.com/zendesk/user_data_app/pull/46.diff","patch_url":"https://github.com/zendesk/user_data_app/pull/46.patch","issue_url":"https://api.github.com/repos/zendesk/user_data_app/issues/46","number":46,"state":"open","locked":false,"title":"handle role","user":{"login":"sandlerr","id":5535625,"avatar_url":"https://avatars.githubusercontent.com/u/5535625?v=3","gravatar_id":"","url":"https://api.github.com/users/sandlerr","html_url":"https://github.com/sandlerr","followers_url":"https://api.github.com/users/sandlerr/followers","following_url":"https://api.github.com/users/sandlerr/following{/other_user}","gists_url":"https://api.github.com/users/sandlerr/gists{/gist_id}","starred_url":"https://api.github.com/users/sandlerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandlerr/subscriptions","organizations_url":"https://api.github.com/users/sandlerr/orgs","repos_url":"https://api.github.com/users/sandlerr/repos","events_url":"https://api.github.com/users/sandlerr/events{/privacy}","received_events_url":"https://api.github.com/users/sandlerr/received_events","type":"User","site_admin":false},"body":":koala:\r\n\r\nMakes fields you can't edit not editable.\r\n\r\n/cc @zendesk/quokka\r\n\r\n### References\r\n - Jira link: https://zendesk.atlassian.net/browse/OFFAPPS-453\r\n\r\n### Risks\r\n - There's a race condition here. If we try to render the view before the customRoles request returns we'll default to being unable to edit organisation fields. Can fix this by making it a promise that blocks rendering the view.","created_at":"2015-07-13T01:12:38Z","updated_at":"2015-07-13T01:16:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"155c3cc4e043631ee4b173f3857fe2a2dbca0ceb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zendesk/user_data_app/pulls/46/commits","review_comments_url":"https://api.github.com/repos/zendesk/user_data_app/pulls/46/comments","review_comment_url":"https://api.github.com/repos/zendesk/user_data_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendesk/user_data_app/issues/46/comments","statuses_url":"https://api.github.com/repos/zendesk/user_data_app/statuses/c5d5ffd9af3c9abd68b3d13d9670d31b3dd24d8a","head":{"label":"zendesk:roman/handle_role","ref":"roman/handle_role","sha":"c5d5ffd9af3c9abd68b3d13d9670d31b3dd24d8a","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":11005423,"name":"user_data_app","full_name":"zendesk/user_data_app","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/user_data_app","description":"User data App","fork":false,"url":"https://api.github.com/repos/zendesk/user_data_app","forks_url":"https://api.github.com/repos/zendesk/user_data_app/forks","keys_url":"https://api.github.com/repos/zendesk/user_data_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/user_data_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/user_data_app/teams","hooks_url":"https://api.github.com/repos/zendesk/user_data_app/hooks","issue_events_url":"https://api.github.com/repos/zendesk/user_data_app/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/user_data_app/events","assignees_url":"https://api.github.com/repos/zendesk/user_data_app/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/user_data_app/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/user_data_app/tags","blobs_url":"https://api.github.com/repos/zendesk/user_data_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/user_data_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/user_data_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/user_data_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/user_data_app/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/user_data_app/languages","stargazers_url":"https://api.github.com/repos/zendesk/user_data_app/stargazers","contributors_url":"https://api.github.com/repos/zendesk/user_data_app/contributors","subscribers_url":"https://api.github.com/repos/zendesk/user_data_app/subscribers","subscription_url":"https://api.github.com/repos/zendesk/user_data_app/subscription","commits_url":"https://api.github.com/repos/zendesk/user_data_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/user_data_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/user_data_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/user_data_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/user_data_app/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/user_data_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/user_data_app/merges","archive_url":"https://api.github.com/repos/zendesk/user_data_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/user_data_app/downloads","issues_url":"https://api.github.com/repos/zendesk/user_data_app/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/user_data_app/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/user_data_app/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/user_data_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/user_data_app/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/user_data_app/releases{/id}","created_at":"2013-06-27T19:07:47Z","updated_at":"2015-03-10T22:22:34Z","pushed_at":"2015-07-13T01:12:39Z","git_url":"git://github.com/zendesk/user_data_app.git","ssh_url":"git@github.com:zendesk/user_data_app.git","clone_url":"https://github.com/zendesk/user_data_app.git","svn_url":"https://github.com/zendesk/user_data_app","homepage":null,"size":1032,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"zendesk:master","ref":"master","sha":"7bf99d4db57a85ba90af0c3abd7638964d30d097","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":11005423,"name":"user_data_app","full_name":"zendesk/user_data_app","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/user_data_app","description":"User data App","fork":false,"url":"https://api.github.com/repos/zendesk/user_data_app","forks_url":"https://api.github.com/repos/zendesk/user_data_app/forks","keys_url":"https://api.github.com/repos/zendesk/user_data_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/user_data_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/user_data_app/teams","hooks_url":"https://api.github.com/repos/zendesk/user_data_app/hooks","issue_events_url":"https://api.github.com/repos/zendesk/user_data_app/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/user_data_app/events","assignees_url":"https://api.github.com/repos/zendesk/user_data_app/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/user_data_app/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/user_data_app/tags","blobs_url":"https://api.github.com/repos/zendesk/user_data_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/user_data_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/user_data_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/user_data_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/user_data_app/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/user_data_app/languages","stargazers_url":"https://api.github.com/repos/zendesk/user_data_app/stargazers","contributors_url":"https://api.github.com/repos/zendesk/user_data_app/contributors","subscribers_url":"https://api.github.com/repos/zendesk/user_data_app/subscribers","subscription_url":"https://api.github.com/repos/zendesk/user_data_app/subscription","commits_url":"https://api.github.com/repos/zendesk/user_data_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/user_data_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/user_data_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/user_data_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/user_data_app/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/user_data_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/user_data_app/merges","archive_url":"https://api.github.com/repos/zendesk/user_data_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/user_data_app/downloads","issues_url":"https://api.github.com/repos/zendesk/user_data_app/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/user_data_app/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/user_data_app/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/user_data_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/user_data_app/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/user_data_app/releases{/id}","created_at":"2013-06-27T19:07:47Z","updated_at":"2015-03-10T22:22:34Z","pushed_at":"2015-07-13T01:12:39Z","git_url":"git://github.com/zendesk/user_data_app.git","ssh_url":"git@github.com:zendesk/user_data_app.git","clone_url":"https://github.com/zendesk/user_data_app.git","svn_url":"https://github.com/zendesk/user_data_app","homepage":null,"size":1032,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendesk/user_data_app/pulls/46"},"html":{"href":"https://github.com/zendesk/user_data_app/pull/46"},"issue":{"href":"https://api.github.com/repos/zendesk/user_data_app/issues/46"},"comments":{"href":"https://api.github.com/repos/zendesk/user_data_app/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/zendesk/user_data_app/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/zendesk/user_data_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendesk/user_data_app/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/zendesk/user_data_app/statuses/c5d5ffd9af3c9abd68b3d13d9670d31b3dd24d8a"}}}}