GitHub PullRequestReviewCommentEvent at 2014-11-07 19:23:24
Repository: fxa-content-server
Actor: zaach
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/comments/20030950","id":20030950,"diff_hunk":"@@ -6,27 +6,42 @@\n \n define([\n   'underscore',\n+  'lib/session',\n   'views/form',\n   'views/base',\n-  'stache!templates/settings',\n-  'lib/session',\n-  'lib/constants'\n+  'views/mixins/avatar-mixin',\n+  'stache!templates/settings'\n ],\n-function (_, FormView, BaseView, Template, Session, Constants) {\n+function (_, Session, FormView, BaseView, AvatarMixin, Template) {\n   var t = BaseView.t;\n \n   var View = FormView.extend({\n-    // user must be authenticated to see Settings\n-    mustAuth: true,\n+    // user must be authenticated and verified to see Settings\n+    mustVerify: true,\n \n     template: Template,\n     className: 'settings',\n \n+    initialize: function () {\n+      var self = this;\n+      var uid = self.searchParam('uid');\n+\n+      // We set the current account to the one with `uid` if\n+      // it exists in our list of cached accounts. If it doesn't,\n+      // clear the current account.\n+      // The `mustVerify` flag will ensure that the account is valid.\n+      if (! self.user.getAccountByUid(uid).isEmpty()) {","path":"app/scripts/views/settings.js","position":34,"original_position":34,"commit_id":"b21af75af11c1322c2308d508d55060a5a747b67","original_commit_id":"b21af75af11c1322c2308d508d55060a5a747b67","user":{"login":"zaach","id":3903,"avatar_url":"https://avatars.githubusercontent.com/u/3903?v=3","gravatar_id":"","url":"https://api.github.com/users/zaach","html_url":"https://github.com/zaach","followers_url":"https://api.github.com/users/zaach/followers","following_url":"https://api.github.com/users/zaach/following{/other_user}","gists_url":"https://api.github.com/users/zaach/gists{/gist_id}","starred_url":"https://api.github.com/users/zaach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaach/subscriptions","organizations_url":"https://api.github.com/users/zaach/orgs","repos_url":"https://api.github.com/users/zaach/repos","events_url":"https://api.github.com/users/zaach/events{/privacy}","received_events_url":"https://api.github.com/users/zaach/received_events","type":"User","site_admin":false},"body":"`uid` is specified by an RP that wants to link directly to settings for a specific user. If it's not there, it just a normal request of the settings page and we use the currently logged in user account.","created_at":"2014-11-07T19:23:24Z","updated_at":"2014-11-07T19:23:24Z","html_url":"https://github.com/mozilla/fxa-content-server/pull/1733#discussion_r20030950","pull_request_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/1733","_links":{"self":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/comments/20030950"},"html":{"href":"https://github.com/mozilla/fxa-content-server/pull/1733#discussion_r20030950"},"pull_request":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/1733"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/1733","id":22123030,"html_url":"https://github.com/mozilla/fxa-content-server/pull/1733","diff_url":"https://github.com/mozilla/fxa-content-server/pull/1733.diff","patch_url":"https://github.com/mozilla/fxa-content-server/pull/1733.patch","issue_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/1733","number":1733,"state":"open","locked":false,"title":"fix(avatars): load profile image on settings and sign in pages if available","user":{"login":"zaach","id":3903,"avatar_url":"https://avatars.githubusercontent.com/u/3903?v=3","gravatar_id":"","url":"https://api.github.com/users/zaach","html_url":"https://github.com/zaach","followers_url":"https://api.github.com/users/zaach/followers","following_url":"https://api.github.com/users/zaach/following{/other_user}","gists_url":"https://api.github.com/users/zaach/gists{/gist_id}","starred_url":"https://api.github.com/users/zaach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaach/subscriptions","organizations_url":"https://api.github.com/users/zaach/orgs","repos_url":"https://api.github.com/users/zaach/repos","events_url":"https://api.github.com/users/zaach/events{/privacy}","received_events_url":"https://api.github.com/users/zaach/received_events","type":"User","site_admin":false},"body":" This refactor changes a number of things:\r\n    * fix avatar background (fixes #1722)\r\n    * loads profile images on settings and sign in account chooser (fixes #1727)\r\n    * introduces User and Account models\r\n    * imports old Session based sessions into User\r\n    * handles direct link to settings page from RPs for a specified account (fixes #1686)\r\n    * redirects unverified accounts that visit /settings (fixes #1716)\r\n    * introduces a way to pass ephemeral data between views\r\n    * removes unused avatar-change-via-URL resources/tests (fixes #1544, fixes #1618)","created_at":"2014-10-02T06:51:45Z","updated_at":"2014-11-07T19:23:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49e474fe6084d8f010d0645c790c322e015ba7a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/1733/commits","review_comments_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/1733/comments","review_comment_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/1733/comments","statuses_url":"https://api.github.com/repos/mozilla/fxa-content-server/statuses/b21af75af11c1322c2308d508d55060a5a747b67","head":{"label":"mozilla:issue-1727-load-avatar-on-profile","ref":"issue-1727-load-avatar-on-profile","sha":"b21af75af11c1322c2308d508d55060a5a747b67","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":11778024,"name":"fxa-content-server","full_name":"mozilla/fxa-content-server","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/fxa-content-server","description":"Firefox Accounts Content Server","fork":false,"url":"https://api.github.com/repos/mozilla/fxa-content-server","forks_url":"https://api.github.com/repos/mozilla/fxa-content-server/forks","keys_url":"https://api.github.com/repos/mozilla/fxa-content-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/fxa-content-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/fxa-content-server/teams","hooks_url":"https://api.github.com/repos/mozilla/fxa-content-server/hooks","issue_events_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/fxa-content-server/events","assignees_url":"https://api.github.com/repos/mozilla/fxa-content-server/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/fxa-content-server/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/fxa-content-server/tags","blobs_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/fxa-content-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/fxa-content-server/languages","stargazers_url":"https://api.github.com/repos/mozilla/fxa-content-server/stargazers","contributors_url":"https://api.github.com/repos/mozilla/fxa-content-server/contributors","subscribers_url":"https://api.github.com/repos/mozilla/fxa-content-server/subscribers","subscription_url":"https://api.github.com/repos/mozilla/fxa-content-server/subscription","commits_url":"https://api.github.com/repos/mozilla/fxa-content-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/fxa-content-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/fxa-content-server/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/fxa-content-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/fxa-content-server/merges","archive_url":"https://api.github.com/repos/mozilla/fxa-content-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/fxa-content-server/downloads","issues_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/fxa-content-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/fxa-content-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/fxa-content-server/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/fxa-content-server/releases{/id}","created_at":"2013-07-30T23:35:35Z","updated_at":"2014-10-31T17:18:15Z","pushed_at":"2014-11-07T17:26:51Z","git_url":"git://github.com/mozilla/fxa-content-server.git","ssh_url":"git@github.com:mozilla/fxa-content-server.git","clone_url":"https://github.com/mozilla/fxa-content-server.git","svn_url":"https://github.com/mozilla/fxa-content-server","homepage":"","size":32425,"stargazers_count":37,"watchers_count":37,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":209,"forks":26,"open_issues":209,"watchers":37,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"1c47bab57b711d549483aa66b97b0fa901eb7919","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":11778024,"name":"fxa-content-server","full_name":"mozilla/fxa-content-server","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/fxa-content-server","description":"Firefox Accounts Content Server","fork":false,"url":"https://api.github.com/repos/mozilla/fxa-content-server","forks_url":"https://api.github.com/repos/mozilla/fxa-content-server/forks","keys_url":"https://api.github.com/repos/mozilla/fxa-content-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/fxa-content-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/fxa-content-server/teams","hooks_url":"https://api.github.com/repos/mozilla/fxa-content-server/hooks","issue_events_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/fxa-content-server/events","assignees_url":"https://api.github.com/repos/mozilla/fxa-content-server/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/fxa-content-server/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/fxa-content-server/tags","blobs_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/fxa-content-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/fxa-content-server/languages","stargazers_url":"https://api.github.com/repos/mozilla/fxa-content-server/stargazers","contributors_url":"https://api.github.com/repos/mozilla/fxa-content-server/contributors","subscribers_url":"https://api.github.com/repos/mozilla/fxa-content-server/subscribers","subscription_url":"https://api.github.com/repos/mozilla/fxa-content-server/subscription","commits_url":"https://api.github.com/repos/mozilla/fxa-content-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/fxa-content-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/fxa-content-server/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/fxa-content-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/fxa-content-server/merges","archive_url":"https://api.github.com/repos/mozilla/fxa-content-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/fxa-content-server/downloads","issues_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/fxa-content-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/fxa-content-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/fxa-content-server/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/fxa-content-server/releases{/id}","created_at":"2013-07-30T23:35:35Z","updated_at":"2014-10-31T17:18:15Z","pushed_at":"2014-11-07T17:26:51Z","git_url":"git://github.com/mozilla/fxa-content-server.git","ssh_url":"git@github.com:mozilla/fxa-content-server.git","clone_url":"https://github.com/mozilla/fxa-content-server.git","svn_url":"https://github.com/mozilla/fxa-content-server","homepage":"","size":32425,"stargazers_count":37,"watchers_count":37,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":209,"forks":26,"open_issues":209,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/1733"},"html":{"href":"https://github.com/mozilla/fxa-content-server/pull/1733"},"issue":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/issues/1733"},"comments":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/issues/1733/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/1733/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/1733/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/statuses/b21af75af11c1322c2308d508d55060a5a747b67"}}}}