{"action":"created","comment":{"url":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/comments/60901550","id":60901550,"diff_hunk":"@@ -751,17 +766,20 @@ exports = module.exports = {\n         return res.json({success: false, message: 'request body was not a valid object'});\n       }\n \n-      // TODO - Verify the current user has rights\n-      // HACK -- Allowing @learningpool.com email addresses for now\n-      if (user.email.indexOf('@learningpool.com') > -1) {\n+      self.hasPermission('update', user, delta, function(err, isAllowed) {\n+        if (err) {","path":"lib/usermanager.js","position":66,"original_position":66,"commit_id":"bb395b17bc9cea43b104821ffa40a6b6e6512614","original_commit_id":"bb395b17bc9cea43b104821ffa40a6b6e6512614","user":{"login":"ryan-lynch","id":13274857,"avatar_url":"https://avatars.githubusercontent.com/u/13274857?v=3","gravatar_id":"","url":"https://api.github.com/users/ryan-lynch","html_url":"https://github.com/ryan-lynch","followers_url":"https://api.github.com/users/ryan-lynch/followers","following_url":"https://api.github.com/users/ryan-lynch/following{/other_user}","gists_url":"https://api.github.com/users/ryan-lynch/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-lynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-lynch/subscriptions","organizations_url":"https://api.github.com/users/ryan-lynch/orgs","repos_url":"https://api.github.com/users/ryan-lynch/repos","events_url":"https://api.github.com/users/ryan-lynch/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-lynch/received_events","type":"User","site_admin":false},"body":"Woops, I'll handle this","created_at":"2016-04-25T12:01:24Z","updated_at":"2016-04-25T12:01:24Z","html_url":"https://github.com/adaptlearning/adapt_authoring/pull/1148#discussion_r60901550","pull_request_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/1148","_links":{"self":{"href":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/comments/60901550"},"html":{"href":"https://github.com/adaptlearning/adapt_authoring/pull/1148#discussion_r60901550"},"pull_request":{"href":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/1148"}}},"pull_request":{"url":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/1148","id":67704415,"html_url":"https://github.com/adaptlearning/adapt_authoring/pull/1148","diff_url":"https://github.com/adaptlearning/adapt_authoring/pull/1148.diff","patch_url":"https://github.com/adaptlearning/adapt_authoring/pull/1148.patch","issue_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/issues/1148","number":1148,"state":"open","locked":false,"title":"Resolves issue 1147","user":{"login":"ryan-lynch","id":13274857,"avatar_url":"https://avatars.githubusercontent.com/u/13274857?v=3","gravatar_id":"","url":"https://api.github.com/users/ryan-lynch","html_url":"https://github.com/ryan-lynch","followers_url":"https://api.github.com/users/ryan-lynch/followers","following_url":"https://api.github.com/users/ryan-lynch/following{/other_user}","gists_url":"https://api.github.com/users/ryan-lynch/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-lynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-lynch/subscriptions","organizations_url":"https://api.github.com/users/ryan-lynch/orgs","repos_url":"https://api.github.com/users/ryan-lynch/repos","events_url":"https://api.github.com/users/ryan-lynch/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-lynch/received_events","type":"User","site_admin":false},"body":"Removed a hack that checks for @learningpool.com e-mail address to give permissions to resetPassword and replaced it with a call to hasPermission. Also removed resetPassword endpoint from the ignoreRoutes array.\r\n\r\nThe require for permissions in usermanager.js is now called in the hasPermissions function declaration as it has a circular dependency issue described here: http://selfcontained.us/2012/05/08/node-js-circular-dependencies/","created_at":"2016-04-25T11:32:09Z","updated_at":"2016-04-25T12:01:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bbaf699adcf68fc883cc3f2e7942aeceef9561ed","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/1148/commits","review_comments_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/1148/comments","review_comment_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/issues/1148/comments","statuses_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/statuses/bb395b17bc9cea43b104821ffa40a6b6e6512614","head":{"label":"ryan-lynch:Issue-1147","ref":"Issue-1147","sha":"bb395b17bc9cea43b104821ffa40a6b6e6512614","user":{"login":"ryan-lynch","id":13274857,"avatar_url":"https://avatars.githubusercontent.com/u/13274857?v=3","gravatar_id":"","url":"https://api.github.com/users/ryan-lynch","html_url":"https://github.com/ryan-lynch","followers_url":"https://api.github.com/users/ryan-lynch/followers","following_url":"https://api.github.com/users/ryan-lynch/following{/other_user}","gists_url":"https://api.github.com/users/ryan-lynch/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-lynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-lynch/subscriptions","organizations_url":"https://api.github.com/users/ryan-lynch/orgs","repos_url":"https://api.github.com/users/ryan-lynch/repos","events_url":"https://api.github.com/users/ryan-lynch/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-lynch/received_events","type":"User","site_admin":false},"repo":{"id":47612580,"name":"adapt_authoring","full_name":"ryan-lynch/adapt_authoring","owner":{"login":"ryan-lynch","id":13274857,"avatar_url":"https://avatars.githubusercontent.com/u/13274857?v=3","gravatar_id":"","url":"https://api.github.com/users/ryan-lynch","html_url":"https://github.com/ryan-lynch","followers_url":"https://api.github.com/users/ryan-lynch/followers","following_url":"https://api.github.com/users/ryan-lynch/following{/other_user}","gists_url":"https://api.github.com/users/ryan-lynch/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-lynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-lynch/subscriptions","organizations_url":"https://api.github.com/users/ryan-lynch/orgs","repos_url":"https://api.github.com/users/ryan-lynch/repos","events_url":"https://api.github.com/users/ryan-lynch/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-lynch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryan-lynch/adapt_authoring","description":"Source code for the Adapt Authoring tool","fork":true,"url":"https://api.github.com/repos/ryan-lynch/adapt_authoring","forks_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/forks","keys_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/teams","hooks_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/hooks","issue_events_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/issues/events{/number}","events_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/events","assignees_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/assignees{/user}","branches_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/branches{/branch}","tags_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/tags","blobs_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/statuses/{sha}","languages_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/languages","stargazers_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/stargazers","contributors_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/contributors","subscribers_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/subscribers","subscription_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/subscription","commits_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/contents/{+path}","compare_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/merges","archive_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/downloads","issues_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/issues{/number}","pulls_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/pulls{/number}","milestones_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/milestones{/number}","notifications_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/labels{/name}","releases_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/releases{/id}","deployments_url":"https://api.github.com/repos/ryan-lynch/adapt_authoring/deployments","created_at":"2015-12-08T09:37:00Z","updated_at":"2015-12-08T09:37:02Z","pushed_at":"2016-04-25T11:33:22Z","git_url":"git://github.com/ryan-lynch/adapt_authoring.git","ssh_url":"git@github.com:ryan-lynch/adapt_authoring.git","clone_url":"https://github.com/ryan-lynch/adapt_authoring.git","svn_url":"https://github.com/ryan-lynch/adapt_authoring","homepage":null,"size":41794,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"adaptlearning:develop","ref":"develop","sha":"1ba73c17a3e43ebe56833bf0250b565ca957d442","user":{"login":"adaptlearning","id":5629464,"avatar_url":"https://avatars.githubusercontent.com/u/5629464?v=3","gravatar_id":"","url":"https://api.github.com/users/adaptlearning","html_url":"https://github.com/adaptlearning","followers_url":"https://api.github.com/users/adaptlearning/followers","following_url":"https://api.github.com/users/adaptlearning/following{/other_user}","gists_url":"https://api.github.com/users/adaptlearning/gists{/gist_id}","starred_url":"https://api.github.com/users/adaptlearning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaptlearning/subscriptions","organizations_url":"https://api.github.com/users/adaptlearning/orgs","repos_url":"https://api.github.com/users/adaptlearning/repos","events_url":"https://api.github.com/users/adaptlearning/events{/privacy}","received_events_url":"https://api.github.com/users/adaptlearning/received_events","type":"Organization","site_admin":false},"repo":{"id":13562581,"name":"adapt_authoring","full_name":"adaptlearning/adapt_authoring","owner":{"login":"adaptlearning","id":5629464,"avatar_url":"https://avatars.githubusercontent.com/u/5629464?v=3","gravatar_id":"","url":"https://api.github.com/users/adaptlearning","html_url":"https://github.com/adaptlearning","followers_url":"https://api.github.com/users/adaptlearning/followers","following_url":"https://api.github.com/users/adaptlearning/following{/other_user}","gists_url":"https://api.github.com/users/adaptlearning/gists{/gist_id}","starred_url":"https://api.github.com/users/adaptlearning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaptlearning/subscriptions","organizations_url":"https://api.github.com/users/adaptlearning/orgs","repos_url":"https://api.github.com/users/adaptlearning/repos","events_url":"https://api.github.com/users/adaptlearning/events{/privacy}","received_events_url":"https://api.github.com/users/adaptlearning/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adaptlearning/adapt_authoring","description":"Source code for the Adapt Authoring tool","fork":false,"url":"https://api.github.com/repos/adaptlearning/adapt_authoring","forks_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/forks","keys_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/teams","hooks_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/hooks","issue_events_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/issues/events{/number}","events_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/events","assignees_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/assignees{/user}","branches_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/branches{/branch}","tags_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/tags","blobs_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/statuses/{sha}","languages_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/languages","stargazers_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/stargazers","contributors_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/contributors","subscribers_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/subscribers","subscription_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/subscription","commits_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/contents/{+path}","compare_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/merges","archive_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/downloads","issues_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/issues{/number}","pulls_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls{/number}","milestones_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/milestones{/number}","notifications_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/labels{/name}","releases_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/releases{/id}","deployments_url":"https://api.github.com/repos/adaptlearning/adapt_authoring/deployments","created_at":"2013-10-14T13:52:24Z","updated_at":"2016-04-12T20:25:46Z","pushed_at":"2016-04-25T11:32:09Z","git_url":"git://github.com/adaptlearning/adapt_authoring.git","ssh_url":"git@github.com:adaptlearning/adapt_authoring.git","clone_url":"https://github.com/adaptlearning/adapt_authoring.git","svn_url":"https://github.com/adaptlearning/adapt_authoring","homepage":null,"size":46718,"stargazers_count":72,"watchers_count":72,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":124,"forks":68,"open_issues":124,"watchers":72,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/1148"},"html":{"href":"https://github.com/adaptlearning/adapt_authoring/pull/1148"},"issue":{"href":"https://api.github.com/repos/adaptlearning/adapt_authoring/issues/1148"},"comments":{"href":"https://api.github.com/repos/adaptlearning/adapt_authoring/issues/1148/comments"},"review_comments":{"href":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/1148/comments"},"review_comment":{"href":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adaptlearning/adapt_authoring/pulls/1148/commits"},"statuses":{"href":"https://api.github.com/repos/adaptlearning/adapt_authoring/statuses/bb395b17bc9cea43b104821ffa40a6b6e6512614"}}}}