{"action":"created","comment":{"url":"https://api.github.com/repos/appsembler/edx-platform/pulls/comments/241366673","pull_request_review_id":184618001,"id":241366673,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTM2NjY3Mw==","diff_hunk":"@@ -3,10 +3,11 @@\n Code adapted from Figures\n \n \"\"\"\n-from rest_framework.permissions import BasePermission\n-\n import django.contrib.sites.shortcuts\n \n+from rest_framework.permissions import BasePermission\n+from rest_framework.throttling import UserRateThrottle","path":"openedx/core/djangoapps/appsembler/api/permissions.py","position":9,"original_position":9,"commit_id":"aa15f4a2128a769dd8370a049a0a1da094559cc3","original_commit_id":"aa15f4a2128a769dd8370a049a0a1da094559cc3","user":{"login":"OmarIthawi","id":645156,"node_id":"MDQ6VXNlcjY0NTE1Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/645156?v=4","gravatar_id":"","url":"https://api.github.com/users/OmarIthawi","html_url":"https://github.com/OmarIthawi","followers_url":"https://api.github.com/users/OmarIthawi/followers","following_url":"https://api.github.com/users/OmarIthawi/following{/other_user}","gists_url":"https://api.github.com/users/OmarIthawi/gists{/gist_id}","starred_url":"https://api.github.com/users/OmarIthawi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmarIthawi/subscriptions","organizations_url":"https://api.github.com/users/OmarIthawi/orgs","repos_url":"https://api.github.com/users/OmarIthawi/repos","events_url":"https://api.github.com/users/OmarIthawi/events{/privacy}","received_events_url":"https://api.github.com/users/OmarIthawi/received_events","type":"User","site_admin":false},"body":"Looks like `UserRateThrottle` already matches what we need, and better than the `RateLimit` module.","created_at":"2018-12-13T11:34:06Z","updated_at":"2018-12-13T11:40:53Z","html_url":"https://github.com/appsembler/edx-platform/pull/295#discussion_r241366673","pull_request_url":"https://api.github.com/repos/appsembler/edx-platform/pulls/295","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/appsembler/edx-platform/pulls/comments/241366673"},"html":{"href":"https://github.com/appsembler/edx-platform/pull/295#discussion_r241366673"},"pull_request":{"href":"https://api.github.com/repos/appsembler/edx-platform/pulls/295"}}},"pull_request":{"url":"https://api.github.com/repos/appsembler/edx-platform/pulls/295","id":238286191,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4Mjg2MTkx","html_url":"https://github.com/appsembler/edx-platform/pull/295","diff_url":"https://github.com/appsembler/edx-platform/pull/295.diff","patch_url":"https://github.com/appsembler/edx-platform/pull/295.patch","issue_url":"https://api.github.com/repos/appsembler/edx-platform/issues/295","number":295,"state":"open","locked":false,"title":"Adds throttling (rate limiting) to the Tahoe API","user":{"login":"johnbaldwin","id":10279,"node_id":"MDQ6VXNlcjEwMjc5","avatar_url":"https://avatars1.githubusercontent.com/u/10279?v=4","gravatar_id":"","url":"https://api.github.com/users/johnbaldwin","html_url":"https://github.com/johnbaldwin","followers_url":"https://api.github.com/users/johnbaldwin/followers","following_url":"https://api.github.com/users/johnbaldwin/following{/other_user}","gists_url":"https://api.github.com/users/johnbaldwin/gists{/gist_id}","starred_url":"https://api.github.com/users/johnbaldwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnbaldwin/subscriptions","organizations_url":"https://api.github.com/users/johnbaldwin/orgs","repos_url":"https://api.github.com/users/johnbaldwin/repos","events_url":"https://api.github.com/users/johnbaldwin/events{/privacy}","received_events_url":"https://api.github.com/users/johnbaldwin/received_events","type":"User","site_admin":false},"body":"- User based throttling added to the user registration api\r\n- Throttling is assigned per ViewSet\r\n- Throttle class is `TahoeAPIUserThrottle`\r\n- Rate is 60/minute","created_at":"2018-12-13T07:11:03Z","updated_at":"2018-12-13T11:40:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7005b63c71eaf9e19321355595e1feae7177df2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"melvinsoft","id":1225854,"node_id":"MDQ6VXNlcjEyMjU4NTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1225854?v=4","gravatar_id":"","url":"https://api.github.com/users/melvinsoft","html_url":"https://github.com/melvinsoft","followers_url":"https://api.github.com/users/melvinsoft/followers","following_url":"https://api.github.com/users/melvinsoft/following{/other_user}","gists_url":"https://api.github.com/users/melvinsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/melvinsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melvinsoft/subscriptions","organizations_url":"https://api.github.com/users/melvinsoft/orgs","repos_url":"https://api.github.com/users/melvinsoft/repos","events_url":"https://api.github.com/users/melvinsoft/events{/privacy}","received_events_url":"https://api.github.com/users/melvinsoft/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/appsembler/edx-platform/pulls/295/commits","review_comments_url":"https://api.github.com/repos/appsembler/edx-platform/pulls/295/comments","review_comment_url":"https://api.github.com/repos/appsembler/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appsembler/edx-platform/issues/295/comments","statuses_url":"https://api.github.com/repos/appsembler/edx-platform/statuses/aa15f4a2128a769dd8370a049a0a1da094559cc3","head":{"label":"appsembler:appsembler/amc/feature/tahoe-api-throttle","ref":"appsembler/amc/feature/tahoe-api-throttle","sha":"aa15f4a2128a769dd8370a049a0a1da094559cc3","user":{"login":"appsembler","id":1369373,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjkzNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1369373?v=4","gravatar_id":"","url":"https://api.github.com/users/appsembler","html_url":"https://github.com/appsembler","followers_url":"https://api.github.com/users/appsembler/followers","following_url":"https://api.github.com/users/appsembler/following{/other_user}","gists_url":"https://api.github.com/users/appsembler/gists{/gist_id}","starred_url":"https://api.github.com/users/appsembler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appsembler/subscriptions","organizations_url":"https://api.github.com/users/appsembler/orgs","repos_url":"https://api.github.com/users/appsembler/repos","events_url":"https://api.github.com/users/appsembler/events{/privacy}","received_events_url":"https://api.github.com/users/appsembler/received_events","type":"Organization","site_admin":false},"repo":{"id":24888634,"node_id":"MDEwOlJlcG9zaXRvcnkyNDg4ODYzNA==","name":"edx-platform","full_name":"appsembler/edx-platform","private":false,"owner":{"login":"appsembler","id":1369373,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjkzNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1369373?v=4","gravatar_id":"","url":"https://api.github.com/users/appsembler","html_url":"https://github.com/appsembler","followers_url":"https://api.github.com/users/appsembler/followers","following_url":"https://api.github.com/users/appsembler/following{/other_user}","gists_url":"https://api.github.com/users/appsembler/gists{/gist_id}","starred_url":"https://api.github.com/users/appsembler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appsembler/subscriptions","organizations_url":"https://api.github.com/users/appsembler/orgs","repos_url":"https://api.github.com/users/appsembler/repos","events_url":"https://api.github.com/users/appsembler/events{/privacy}","received_events_url":"https://api.github.com/users/appsembler/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/appsembler/edx-platform","description":"Open edX, the edX platform that powers http://edx.org","fork":true,"url":"https://api.github.com/repos/appsembler/edx-platform","forks_url":"https://api.github.com/repos/appsembler/edx-platform/forks","keys_url":"https://api.github.com/repos/appsembler/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appsembler/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appsembler/edx-platform/teams","hooks_url":"https://api.github.com/repos/appsembler/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/appsembler/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/appsembler/edx-platform/events","assignees_url":"https://api.github.com/repos/appsembler/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/appsembler/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/appsembler/edx-platform/tags","blobs_url":"https://api.github.com/repos/appsembler/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appsembler/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appsembler/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/appsembler/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appsembler/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/appsembler/edx-platform/languages","stargazers_url":"https://api.github.com/repos/appsembler/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/appsembler/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/appsembler/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/appsembler/edx-platform/subscription","commits_url":"https://api.github.com/repos/appsembler/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/appsembler/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/appsembler/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/appsembler/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/appsembler/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/appsembler/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appsembler/edx-platform/merges","archive_url":"https://api.github.com/repos/appsembler/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appsembler/edx-platform/downloads","issues_url":"https://api.github.com/repos/appsembler/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/appsembler/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/appsembler/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/appsembler/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appsembler/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/appsembler/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/appsembler/edx-platform/deployments","created_at":"2014-10-07T12:09:06Z","updated_at":"2018-09-30T11:41:02Z","pushed_at":"2018-12-13T07:11:04Z","git_url":"git://github.com/appsembler/edx-platform.git","ssh_url":"git@github.com:appsembler/edx-platform.git","clone_url":"https://github.com/appsembler/edx-platform.git","svn_url":"https://github.com/appsembler/edx-platform","homepage":"http://openedx.org/","size":990891,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":18,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"appsembler:appsembler/amc/develop","ref":"appsembler/amc/develop","sha":"1d410580c6aabe1e0777770ebc6b94fe4776e1d3","user":{"login":"appsembler","id":1369373,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjkzNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1369373?v=4","gravatar_id":"","url":"https://api.github.com/users/appsembler","html_url":"https://github.com/appsembler","followers_url":"https://api.github.com/users/appsembler/followers","following_url":"https://api.github.com/users/appsembler/following{/other_user}","gists_url":"https://api.github.com/users/appsembler/gists{/gist_id}","starred_url":"https://api.github.com/users/appsembler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appsembler/subscriptions","organizations_url":"https://api.github.com/users/appsembler/orgs","repos_url":"https://api.github.com/users/appsembler/repos","events_url":"https://api.github.com/users/appsembler/events{/privacy}","received_events_url":"https://api.github.com/users/appsembler/received_events","type":"Organization","site_admin":false},"repo":{"id":24888634,"node_id":"MDEwOlJlcG9zaXRvcnkyNDg4ODYzNA==","name":"edx-platform","full_name":"appsembler/edx-platform","private":false,"owner":{"login":"appsembler","id":1369373,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjkzNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1369373?v=4","gravatar_id":"","url":"https://api.github.com/users/appsembler","html_url":"https://github.com/appsembler","followers_url":"https://api.github.com/users/appsembler/followers","following_url":"https://api.github.com/users/appsembler/following{/other_user}","gists_url":"https://api.github.com/users/appsembler/gists{/gist_id}","starred_url":"https://api.github.com/users/appsembler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appsembler/subscriptions","organizations_url":"https://api.github.com/users/appsembler/orgs","repos_url":"https://api.github.com/users/appsembler/repos","events_url":"https://api.github.com/users/appsembler/events{/privacy}","received_events_url":"https://api.github.com/users/appsembler/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/appsembler/edx-platform","description":"Open edX, the edX platform that powers http://edx.org","fork":true,"url":"https://api.github.com/repos/appsembler/edx-platform","forks_url":"https://api.github.com/repos/appsembler/edx-platform/forks","keys_url":"https://api.github.com/repos/appsembler/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appsembler/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appsembler/edx-platform/teams","hooks_url":"https://api.github.com/repos/appsembler/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/appsembler/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/appsembler/edx-platform/events","assignees_url":"https://api.github.com/repos/appsembler/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/appsembler/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/appsembler/edx-platform/tags","blobs_url":"https://api.github.com/repos/appsembler/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appsembler/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appsembler/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/appsembler/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appsembler/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/appsembler/edx-platform/languages","stargazers_url":"https://api.github.com/repos/appsembler/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/appsembler/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/appsembler/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/appsembler/edx-platform/subscription","commits_url":"https://api.github.com/repos/appsembler/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/appsembler/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/appsembler/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/appsembler/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/appsembler/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/appsembler/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appsembler/edx-platform/merges","archive_url":"https://api.github.com/repos/appsembler/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appsembler/edx-platform/downloads","issues_url":"https://api.github.com/repos/appsembler/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/appsembler/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/appsembler/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/appsembler/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appsembler/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/appsembler/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/appsembler/edx-platform/deployments","created_at":"2014-10-07T12:09:06Z","updated_at":"2018-09-30T11:41:02Z","pushed_at":"2018-12-13T07:11:04Z","git_url":"git://github.com/appsembler/edx-platform.git","ssh_url":"git@github.com:appsembler/edx-platform.git","clone_url":"https://github.com/appsembler/edx-platform.git","svn_url":"https://github.com/appsembler/edx-platform","homepage":"http://openedx.org/","size":990891,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":18,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appsembler/edx-platform/pulls/295"},"html":{"href":"https://github.com/appsembler/edx-platform/pull/295"},"issue":{"href":"https://api.github.com/repos/appsembler/edx-platform/issues/295"},"comments":{"href":"https://api.github.com/repos/appsembler/edx-platform/issues/295/comments"},"review_comments":{"href":"https://api.github.com/repos/appsembler/edx-platform/pulls/295/comments"},"review_comment":{"href":"https://api.github.com/repos/appsembler/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appsembler/edx-platform/pulls/295/commits"},"statuses":{"href":"https://api.github.com/repos/appsembler/edx-platform/statuses/aa15f4a2128a769dd8370a049a0a1da094559cc3"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"OmarIthawi"}}