GitHub PullRequestEvent at 2014-04-16 22:56:20
Repository: ka-lite
Actor: bcipolli
Payload: {"action":"closed","number":1958,"pull_request":{"url":"https://api.github.com/repos/learningequality/ka-lite/pulls/1958","id":14692057,"html_url":"https://github.com/learningequality/ka-lite/pull/1958","diff_url":"https://github.com/learningequality/ka-lite/pull/1958.diff","patch_url":"https://github.com/learningequality/ka-lite/pull/1958.patch","issue_url":"https://api.github.com/repos/learningequality/ka-lite/issues/1958","number":1958,"state":"closed","title":"#110: Initial paywall feature (demo).","user":{"login":"bcipolli","id":4072455,"avatar_url":"https://avatars.githubusercontent.com/u/4072455?","gravatar_id":"d87e7f8d7e3ad7016a07bf861d767ebd","url":"https://api.github.com/users/bcipolli","html_url":"https://github.com/bcipolli","followers_url":"https://api.github.com/users/bcipolli/followers","following_url":"https://api.github.com/users/bcipolli/following{/other_user}","gists_url":"https://api.github.com/users/bcipolli/gists{/gist_id}","starred_url":"https://api.github.com/users/bcipolli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcipolli/subscriptions","organizations_url":"https://api.github.com/users/bcipolli/orgs","repos_url":"https://api.github.com/users/bcipolli/repos","events_url":"https://api.github.com/users/bcipolli/events{/privacy}","received_events_url":"https://api.github.com/users/bcipolli/received_events","type":"User","site_admin":false},"body":"This PR is intended to further discuss the design of a paywall for central server resources.  I'm implementing here as a hotfix (see https://github.com/fle-internal/ka-lite-central/issues/110) while we work on getting the `nalanda-rct1` central server code ready for production.\r\n\r\nMain features:\r\n\r\n* Has a `CentralLicense` table, where a single user or Organization can have access levels defined.\r\n* Individual tiers of access (currently `Basic`, `Plus`, `Premium`, and `Elite`), with custom levels of data access (currently restricts based on # of `Zones`, `Devices`, and `FacilityUser` records)\r\n* Listeners are implemented to prevent extra objects from being added to an accunt--this allows the paywall features to be extremely localized.\r\n* On error, users can be linked (through a message), or redirected to a page where access options can be reviewed.\r\n\r\nCaveats:\r\n\r\n* Page with access options isn't built yet.\r\n* Record creation code needs to be wrapped (a) to catch errors (rather than showing a 500 server error) and (b) to be clean about not creating orphan objects.  So though most of the logic is localized, a small bit of error logic is not (exception handling)\r\n* Access levels defined are pretty arbitrary:\r\n    * `Basic`: max: 1 device, 1 zone, 10 facility users\r\n    * `Plus`: max: 5 devices, 2 zones, 100 facility users\r\n    * `Premium`: max: 25 devices, 5 zones, 500 facility users\r\n    * `Elite`: no restrictions\r\n\r\nWould be relatively easy to set each of these values as a JSON blob (as they are already stored as a dictionary), and allow users to pay by the device/zone/user.\r\n\r\nLooking for feedback / ideas / :+1: / anything else out there that's helpful in pushing this forward!\r\n\r\n![screen shot 2014-04-13 at 12 04 47 am](https://cloud.githubusercontent.com/assets/4072455/2688930/c304c73a-c2d9-11e3-8a5e-ba55a2069905.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/4072455/2688934/27f8ab34-c2da-11e3-9294-a80f678fcf64.png)\r\n","created_at":"2014-04-13T07:07:00Z","updated_at":"2014-04-16T22:56:20Z","closed_at":"2014-04-16T22:56:20Z","merged_at":null,"merge_commit_sha":"614a2d564e2bf18bd26829d5af7c162a9df2095c","assignee":null,"milestone":{"url":"https://api.github.com/repos/learningequality/ka-lite/milestones/33","labels_url":"https://api.github.com/repos/learningequality/ka-lite/milestones/33/labels","id":584570,"number":33,"title":"Nalanda RCT 2","description":"Release 2 of the RCT project, including:\r\n* Playlists (finally!)\r\n* Summative assessments\r\n* Granular data collection (using a new one-way syncing mechanism)\r\n* Update on the points reward system","creator":{"login":"bcipolli","id":4072455,"avatar_url":"https://avatars.githubusercontent.com/u/4072455?","gravatar_id":"d87e7f8d7e3ad7016a07bf861d767ebd","url":"https://api.github.com/users/bcipolli","html_url":"https://github.com/bcipolli","followers_url":"https://api.github.com/users/bcipolli/followers","following_url":"https://api.github.com/users/bcipolli/following{/other_user}","gists_url":"https://api.github.com/users/bcipolli/gists{/gist_id}","starred_url":"https://api.github.com/users/bcipolli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcipolli/subscriptions","organizations_url":"https://api.github.com/users/bcipolli/orgs","repos_url":"https://api.github.com/users/bcipolli/repos","events_url":"https://api.github.com/users/bcipolli/events{/privacy}","received_events_url":"https://api.github.com/users/bcipolli/received_events","type":"User","site_admin":false},"open_issues":59,"closed_issues":7,"state":"open","created_at":"2014-03-01T22:38:08Z","updated_at":"2014-04-16T22:56:20Z","due_on":"2014-06-01T07:00:00Z"},"commits_url":"https://api.github.com/repos/learningequality/ka-lite/pulls/1958/commits","review_comments_url":"https://api.github.com/repos/learningequality/ka-lite/pulls/1958/comments","review_comment_url":"https://api.github.com/repos/learningequality/ka-lite/pulls/comments/{number}","comments_url":"https://api.github.com/repos/learningequality/ka-lite/issues/1958/comments","statuses_url":"https://api.github.com/repos/learningequality/ka-lite/statuses/97c5cae7b7e168c9dc731903d58e2c8d0703f047","head":{"label":"bcipolli:110","ref":"110","sha":"97c5cae7b7e168c9dc731903d58e2c8d0703f047","user":{"login":"bcipolli","id":4072455,"avatar_url":"https://avatars.githubusercontent.com/u/4072455?","gravatar_id":"d87e7f8d7e3ad7016a07bf861d767ebd","url":"https://api.github.com/users/bcipolli","html_url":"https://github.com/bcipolli","followers_url":"https://api.github.com/users/bcipolli/followers","following_url":"https://api.github.com/users/bcipolli/following{/other_user}","gists_url":"https://api.github.com/users/bcipolli/gists{/gist_id}","starred_url":"https://api.github.com/users/bcipolli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcipolli/subscriptions","organizations_url":"https://api.github.com/users/bcipolli/orgs","repos_url":"https://api.github.com/users/bcipolli/repos","events_url":"https://api.github.com/users/bcipolli/events{/privacy}","received_events_url":"https://api.github.com/users/bcipolli/received_events","type":"User","site_admin":false},"repo":{"id":9251725,"name":"ka-lite","full_name":"bcipolli/ka-lite","owner":{"login":"bcipolli","id":4072455,"avatar_url":"https://avatars.githubusercontent.com/u/4072455?","gravatar_id":"d87e7f8d7e3ad7016a07bf861d767ebd","url":"https://api.github.com/users/bcipolli","html_url":"https://github.com/bcipolli","followers_url":"https://api.github.com/users/bcipolli/followers","following_url":"https://api.github.com/users/bcipolli/following{/other_user}","gists_url":"https://api.github.com/users/bcipolli/gists{/gist_id}","starred_url":"https://api.github.com/users/bcipolli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcipolli/subscriptions","organizations_url":"https://api.github.com/users/bcipolli/orgs","repos_url":"https://api.github.com/users/bcipolli/repos","events_url":"https://api.github.com/users/bcipolli/events{/privacy}","received_events_url":"https://api.github.com/users/bcipolli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bcipolli/ka-lite","description":"Khan Academy Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity","fork":true,"url":"https://api.github.com/repos/bcipolli/ka-lite","forks_url":"https://api.github.com/repos/bcipolli/ka-lite/forks","keys_url":"https://api.github.com/repos/bcipolli/ka-lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcipolli/ka-lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcipolli/ka-lite/teams","hooks_url":"https://api.github.com/repos/bcipolli/ka-lite/hooks","issue_events_url":"https://api.github.com/repos/bcipolli/ka-lite/issues/events{/number}","events_url":"https://api.github.com/repos/bcipolli/ka-lite/events","assignees_url":"https://api.github.com/repos/bcipolli/ka-lite/assignees{/user}","branches_url":"https://api.github.com/repos/bcipolli/ka-lite/branches{/branch}","tags_url":"https://api.github.com/repos/bcipolli/ka-lite/tags","blobs_url":"https://api.github.com/repos/bcipolli/ka-lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcipolli/ka-lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcipolli/ka-lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcipolli/ka-lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcipolli/ka-lite/statuses/{sha}","languages_url":"https://api.github.com/repos/bcipolli/ka-lite/languages","stargazers_url":"https://api.github.com/repos/bcipolli/ka-lite/stargazers","contributors_url":"https://api.github.com/repos/bcipolli/ka-lite/contributors","subscribers_url":"https://api.github.com/repos/bcipolli/ka-lite/subscribers","subscription_url":"https://api.github.com/repos/bcipolli/ka-lite/subscription","commits_url":"https://api.github.com/repos/bcipolli/ka-lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcipolli/ka-lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcipolli/ka-lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcipolli/ka-lite/issues/comments/{number}","contents_url":"https://api.github.com/repos/bcipolli/ka-lite/contents/{+path}","compare_url":"https://api.github.com/repos/bcipolli/ka-lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcipolli/ka-lite/merges","archive_url":"https://api.github.com/repos/bcipolli/ka-lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcipolli/ka-lite/downloads","issues_url":"https://api.github.com/repos/bcipolli/ka-lite/issues{/number}","pulls_url":"https://api.github.com/repos/bcipolli/ka-lite/pulls{/number}","milestones_url":"https://api.github.com/repos/bcipolli/ka-lite/milestones{/number}","notifications_url":"https://api.github.com/repos/bcipolli/ka-lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcipolli/ka-lite/labels{/name}","releases_url":"https://api.github.com/repos/bcipolli/ka-lite/releases{/id}","created_at":"2013-04-05T22:11:56Z","updated_at":"2014-04-15T22:48:49Z","pushed_at":"2014-04-15T22:48:49Z","git_url":"git://github.com/bcipolli/ka-lite.git","ssh_url":"git@github.com:bcipolli/ka-lite.git","clone_url":"https://github.com/bcipolli/ka-lite.git","svn_url":"https://github.com/bcipolli/ka-lite","homepage":"http://kalite.learningequality.org/","size":74513,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"learningequality:master","ref":"master","sha":"9cd0a37cdb234fcfdaae3cf483f1173bc0835e0f","user":{"login":"learningequality","id":3926525,"avatar_url":"https://avatars.githubusercontent.com/u/3926525?","gravatar_id":"56ac3f6863c7474d8148e19a35a4e28f","url":"https://api.github.com/users/learningequality","html_url":"https://github.com/learningequality","followers_url":"https://api.github.com/users/learningequality/followers","following_url":"https://api.github.com/users/learningequality/following{/other_user}","gists_url":"https://api.github.com/users/learningequality/gists{/gist_id}","starred_url":"https://api.github.com/users/learningequality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learningequality/subscriptions","organizations_url":"https://api.github.com/users/learningequality/orgs","repos_url":"https://api.github.com/users/learningequality/repos","events_url":"https://api.github.com/users/learningequality/events{/privacy}","received_events_url":"https://api.github.com/users/learningequality/received_events","type":"Organization","site_admin":false},"repo":{"id":5741125,"name":"ka-lite","full_name":"learningequality/ka-lite","owner":{"login":"learningequality","id":3926525,"avatar_url":"https://avatars.githubusercontent.com/u/3926525?","gravatar_id":"56ac3f6863c7474d8148e19a35a4e28f","url":"https://api.github.com/users/learningequality","html_url":"https://github.com/learningequality","followers_url":"https://api.github.com/users/learningequality/followers","following_url":"https://api.github.com/users/learningequality/following{/other_user}","gists_url":"https://api.github.com/users/learningequality/gists{/gist_id}","starred_url":"https://api.github.com/users/learningequality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learningequality/subscriptions","organizations_url":"https://api.github.com/users/learningequality/orgs","repos_url":"https://api.github.com/users/learningequality/repos","events_url":"https://api.github.com/users/learningequality/events{/privacy}","received_events_url":"https://api.github.com/users/learningequality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learningequality/ka-lite","description":"KA Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity","fork":false,"url":"https://api.github.com/repos/learningequality/ka-lite","forks_url":"https://api.github.com/repos/learningequality/ka-lite/forks","keys_url":"https://api.github.com/repos/learningequality/ka-lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learningequality/ka-lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learningequality/ka-lite/teams","hooks_url":"https://api.github.com/repos/learningequality/ka-lite/hooks","issue_events_url":"https://api.github.com/repos/learningequality/ka-lite/issues/events{/number}","events_url":"https://api.github.com/repos/learningequality/ka-lite/events","assignees_url":"https://api.github.com/repos/learningequality/ka-lite/assignees{/user}","branches_url":"https://api.github.com/repos/learningequality/ka-lite/branches{/branch}","tags_url":"https://api.github.com/repos/learningequality/ka-lite/tags","blobs_url":"https://api.github.com/repos/learningequality/ka-lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learningequality/ka-lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learningequality/ka-lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/learningequality/ka-lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learningequality/ka-lite/statuses/{sha}","languages_url":"https://api.github.com/repos/learningequality/ka-lite/languages","stargazers_url":"https://api.github.com/repos/learningequality/ka-lite/stargazers","contributors_url":"https://api.github.com/repos/learningequality/ka-lite/contributors","subscribers_url":"https://api.github.com/repos/learningequality/ka-lite/subscribers","subscription_url":"https://api.github.com/repos/learningequality/ka-lite/subscription","commits_url":"https://api.github.com/repos/learningequality/ka-lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/learningequality/ka-lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/learningequality/ka-lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/learningequality/ka-lite/issues/comments/{number}","contents_url":"https://api.github.com/repos/learningequality/ka-lite/contents/{+path}","compare_url":"https://api.github.com/repos/learningequality/ka-lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learningequality/ka-lite/merges","archive_url":"https://api.github.com/repos/learningequality/ka-lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learningequality/ka-lite/downloads","issues_url":"https://api.github.com/repos/learningequality/ka-lite/issues{/number}","pulls_url":"https://api.github.com/repos/learningequality/ka-lite/pulls{/number}","milestones_url":"https://api.github.com/repos/learningequality/ka-lite/milestones{/number}","notifications_url":"https://api.github.com/repos/learningequality/ka-lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learningequality/ka-lite/labels{/name}","releases_url":"https://api.github.com/repos/learningequality/ka-lite/releases{/id}","created_at":"2012-09-09T20:01:40Z","updated_at":"2014-04-15T23:00:19Z","pushed_at":"2014-04-15T23:00:18Z","git_url":"git://github.com/learningequality/ka-lite.git","ssh_url":"git@github.com:learningequality/ka-lite.git","clone_url":"https://github.com/learningequality/ka-lite.git","svn_url":"https://github.com/learningequality/ka-lite","homepage":"https://kalite.learningequality.org/","size":101044,"stargazers_count":107,"watchers_count":107,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":130,"mirror_url":null,"open_issues_count":284,"forks":130,"open_issues":284,"watchers":107,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learningequality/ka-lite/pulls/1958"},"html":{"href":"https://github.com/learningequality/ka-lite/pull/1958"},"issue":{"href":"https://api.github.com/repos/learningequality/ka-lite/issues/1958"},"comments":{"href":"https://api.github.com/repos/learningequality/ka-lite/issues/1958/comments"},"review_comments":{"href":"https://api.github.com/repos/learningequality/ka-lite/pulls/1958/comments"},"review_comment":{"href":"https://api.github.com/repos/learningequality/ka-lite/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/learningequality/ka-lite/pulls/1958/commits"},"statuses":{"href":"https://api.github.com/repos/learningequality/ka-lite/statuses/97c5cae7b7e168c9dc731903d58e2c8d0703f047"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":2,"review_comments":8,"commits":1,"additions":331,"deletions":7,"changed_files":8}}