GitHub PullRequestReviewCommentEvent at 2014-09-11 08:45:12
Repository: daybed
Actor: ametaireau
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/spiral-project/daybed/pulls/comments/17410031","id":17410031,"diff_hunk":"@@ -56,3 +46,218 @@ For example, if you want to get a complete model (definition and records),\n you will need the following permissions:\n - **read_definition** and **read_permissions**\n - **read_all_records** or **read_own_records**\n+\n+\n+Global permissions\n+==================\n+\n+There are three extra permissions that are configured at the server level:\n+\n+- **create_model**: List of identifiers allowed to create a model\n+- **create_token**: List of identifiers allowed to create tokens\n+- **manage_tokens**: List of identifiers allowed to delete tokens\n+\n+\n+Usage\n+=====\n+\n+Permissions are set on models, as a *dictionnary* between :term:`identifiers` (*key id*)\n+and lists of :term:`permissions`.\n+\n+We refer to the whole world with the special *id* ``Everyone`` (or ``system.Everyone``)\n+and to authenticated users with ``Authenticated`` (or ``system.Authenticated``).\n+\n+:notes:\n+\n+    With Hawk, the *key ids* look like :term:`tokens`, but the *id* is the part of\n+    your :term:`credentials`, and is different from the session token.\n+\n+\n+When you create a model, you gain the full set of available permissions.\n+\n+This means that the credentials id you used in the request will be associated to all permissions ::\n+\n+    {\n+        \"220a1c..871\": [\n+            \"create_record\",\n+            \"delete_all_records\",\n+            \"delete_model\",\n+            \"delete_own_records\",\n+            \"read_all_records\",\n+            \"read_definition\",\n+            \"read_own_records\",\n+            \"read_permissions\",\n+            \"update_all_records\",\n+            \"update_definition\",\n+            \"update_own_records\"\n+            \"update_permissions\",\n+        ]\n+    }\n+\n+\n+Let's say, you want to allow authenticated users to create records and manage\n+their own records on this model.\n+\n+Permissions become :\n+\n+::\n+\n+    {\n+        \"Authenticated\": [\n+            \"create_record\",\n+            \"read_own_records\",\n+            \"update_own_records\",\n+            \"delete_own_records\"\n+        ],\n+        \"220a1c..871\": [\n+            \"create_record\",\n+            \"delete_all_records\",\n+            \"delete_model\",\n+            \"delete_own_records\",\n+            \"read_all_records\",\n+            \"read_definition\",\n+            \"read_own_records\",\n+            \"read_permissions\",\n+            \"update_all_records\",\n+            \"update_definition\",\n+            \"update_own_records\"\n+            \"update_permissions\",\n+        ]\n+    }\n+\n+Modification\n+------------\n+\n+We use ``-`` and ``+`` to modify the existing set of permissions for an","path":"docs/source/permissions.rst","position":103,"original_position":103,"commit_id":"4d1292928ee76781c619334ec112cb17d6d28dc8","original_commit_id":"4d1292928ee76781c619334ec112cb17d6d28dc8","user":{"login":"ametaireau","id":67073,"avatar_url":"https://avatars.githubusercontent.com/u/67073?v=2","gravatar_id":"1b3ec4d4db1722e0459151ff9fd054f2","url":"https://api.github.com/users/ametaireau","html_url":"https://github.com/ametaireau","followers_url":"https://api.github.com/users/ametaireau/followers","following_url":"https://api.github.com/users/ametaireau/following{/other_user}","gists_url":"https://api.github.com/users/ametaireau/gists{/gist_id}","starred_url":"https://api.github.com/users/ametaireau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ametaireau/subscriptions","organizations_url":"https://api.github.com/users/ametaireau/orgs","repos_url":"https://api.github.com/users/ametaireau/repos","events_url":"https://api.github.com/users/ametaireau/events{/privacy}","received_events_url":"https://api.github.com/users/ametaireau/received_events","type":"User","site_admin":false},"body":"We're mixing `we` and `you` in this document. We should always use \"you\". This sentence then becomes \"You can use ``-`` and ``+`` to modify the existing set of permissions for an identifier\"","created_at":"2014-09-11T08:45:12Z","updated_at":"2014-09-11T08:45:12Z","html_url":"https://github.com/spiral-project/daybed/pull/220#discussion_r17410031","pull_request_url":"https://api.github.com/repos/spiral-project/daybed/pulls/220","_links":{"self":{"href":"https://api.github.com/repos/spiral-project/daybed/pulls/comments/17410031"},"html":{"href":"https://github.com/spiral-project/daybed/pull/220#discussion_r17410031"},"pull_request":{"href":"https://api.github.com/repos/spiral-project/daybed/pulls/220"}}},"pull_request":{"url":"https://api.github.com/repos/spiral-project/daybed/pulls/220","id":20662508,"html_url":"https://github.com/spiral-project/daybed/pull/220","diff_url":"https://github.com/spiral-project/daybed/pull/220.diff","patch_url":"https://github.com/spiral-project/daybed/pull/220.patch","issue_url":"https://api.github.com/repos/spiral-project/daybed/issues/220","number":220,"state":"open","locked":false,"title":"Minor docs update","user":{"login":"leplatrem","id":546692,"avatar_url":"https://avatars.githubusercontent.com/u/546692?v=2","gravatar_id":"921bc8b5b7474924e953e8b972c9b01d","url":"https://api.github.com/users/leplatrem","html_url":"https://github.com/leplatrem","followers_url":"https://api.github.com/users/leplatrem/followers","following_url":"https://api.github.com/users/leplatrem/following{/other_user}","gists_url":"https://api.github.com/users/leplatrem/gists{/gist_id}","starred_url":"https://api.github.com/users/leplatrem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leplatrem/subscriptions","organizations_url":"https://api.github.com/users/leplatrem/orgs","repos_url":"https://api.github.com/users/leplatrem/repos","events_url":"https://api.github.com/users/leplatrem/events{/privacy}","received_events_url":"https://api.github.com/users/leplatrem/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-03T08:36:40Z","updated_at":"2014-09-11T08:45:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a056f3647bee92919297f91a6d5695b334288613","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spiral-project/daybed/pulls/220/commits","review_comments_url":"https://api.github.com/repos/spiral-project/daybed/pulls/220/comments","review_comment_url":"https://api.github.com/repos/spiral-project/daybed/pulls/comments/{number}","comments_url":"https://api.github.com/repos/spiral-project/daybed/issues/220/comments","statuses_url":"https://api.github.com/repos/spiral-project/daybed/statuses/4d1292928ee76781c619334ec112cb17d6d28dc8","head":{"label":"spiral-project:minor_doc_updates","ref":"minor_doc_updates","sha":"4d1292928ee76781c619334ec112cb17d6d28dc8","user":{"login":"spiral-project","id":991307,"avatar_url":"https://avatars.githubusercontent.com/u/991307?v=2","gravatar_id":"149544843e9dac05d3a0dc1fd0eef7c7","url":"https://api.github.com/users/spiral-project","html_url":"https://github.com/spiral-project","followers_url":"https://api.github.com/users/spiral-project/followers","following_url":"https://api.github.com/users/spiral-project/following{/other_user}","gists_url":"https://api.github.com/users/spiral-project/gists{/gist_id}","starred_url":"https://api.github.com/users/spiral-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spiral-project/subscriptions","organizations_url":"https://api.github.com/users/spiral-project/orgs","repos_url":"https://api.github.com/users/spiral-project/repos","events_url":"https://api.github.com/users/spiral-project/events{/privacy}","received_events_url":"https://api.github.com/users/spiral-project/received_events","type":"Organization","site_admin":false},"repo":{"id":4032943,"name":"daybed","full_name":"spiral-project/daybed","owner":{"login":"spiral-project","id":991307,"avatar_url":"https://avatars.githubusercontent.com/u/991307?v=2","gravatar_id":"149544843e9dac05d3a0dc1fd0eef7c7","url":"https://api.github.com/users/spiral-project","html_url":"https://github.com/spiral-project","followers_url":"https://api.github.com/users/spiral-project/followers","following_url":"https://api.github.com/users/spiral-project/following{/other_user}","gists_url":"https://api.github.com/users/spiral-project/gists{/gist_id}","starred_url":"https://api.github.com/users/spiral-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spiral-project/subscriptions","organizations_url":"https://api.github.com/users/spiral-project/orgs","repos_url":"https://api.github.com/users/spiral-project/repos","events_url":"https://api.github.com/users/spiral-project/events{/privacy}","received_events_url":"https://api.github.com/users/spiral-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spiral-project/daybed","description":"Form validation and data storage API","fork":false,"url":"https://api.github.com/repos/spiral-project/daybed","forks_url":"https://api.github.com/repos/spiral-project/daybed/forks","keys_url":"https://api.github.com/repos/spiral-project/daybed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spiral-project/daybed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spiral-project/daybed/teams","hooks_url":"https://api.github.com/repos/spiral-project/daybed/hooks","issue_events_url":"https://api.github.com/repos/spiral-project/daybed/issues/events{/number}","events_url":"https://api.github.com/repos/spiral-project/daybed/events","assignees_url":"https://api.github.com/repos/spiral-project/daybed/assignees{/user}","branches_url":"https://api.github.com/repos/spiral-project/daybed/branches{/branch}","tags_url":"https://api.github.com/repos/spiral-project/daybed/tags","blobs_url":"https://api.github.com/repos/spiral-project/daybed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spiral-project/daybed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spiral-project/daybed/git/refs{/sha}","trees_url":"https://api.github.com/repos/spiral-project/daybed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spiral-project/daybed/statuses/{sha}","languages_url":"https://api.github.com/repos/spiral-project/daybed/languages","stargazers_url":"https://api.github.com/repos/spiral-project/daybed/stargazers","contributors_url":"https://api.github.com/repos/spiral-project/daybed/contributors","subscribers_url":"https://api.github.com/repos/spiral-project/daybed/subscribers","subscription_url":"https://api.github.com/repos/spiral-project/daybed/subscription","commits_url":"https://api.github.com/repos/spiral-project/daybed/commits{/sha}","git_commits_url":"https://api.github.com/repos/spiral-project/daybed/git/commits{/sha}","comments_url":"https://api.github.com/repos/spiral-project/daybed/comments{/number}","issue_comment_url":"https://api.github.com/repos/spiral-project/daybed/issues/comments/{number}","contents_url":"https://api.github.com/repos/spiral-project/daybed/contents/{+path}","compare_url":"https://api.github.com/repos/spiral-project/daybed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spiral-project/daybed/merges","archive_url":"https://api.github.com/repos/spiral-project/daybed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spiral-project/daybed/downloads","issues_url":"https://api.github.com/repos/spiral-project/daybed/issues{/number}","pulls_url":"https://api.github.com/repos/spiral-project/daybed/pulls{/number}","milestones_url":"https://api.github.com/repos/spiral-project/daybed/milestones{/number}","notifications_url":"https://api.github.com/repos/spiral-project/daybed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spiral-project/daybed/labels{/name}","releases_url":"https://api.github.com/repos/spiral-project/daybed/releases{/id}","created_at":"2012-04-15T15:45:01Z","updated_at":"2014-09-08T16:22:09Z","pushed_at":"2014-09-09T07:39:33Z","git_url":"git://github.com/spiral-project/daybed.git","ssh_url":"git@github.com:spiral-project/daybed.git","clone_url":"https://github.com/spiral-project/daybed.git","svn_url":"https://github.com/spiral-project/daybed","homepage":"http://daybed.rtfd.org/","size":5888,"stargazers_count":26,"watchers_count":26,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":6,"mirror_url":null,"open_issues_count":34,"forks":6,"open_issues":34,"watchers":26,"default_branch":"master"}},"base":{"label":"spiral-project:master","ref":"master","sha":"8f85da4be7f834deebd4dae95eb7b00c27e80276","user":{"login":"spiral-project","id":991307,"avatar_url":"https://avatars.githubusercontent.com/u/991307?v=2","gravatar_id":"149544843e9dac05d3a0dc1fd0eef7c7","url":"https://api.github.com/users/spiral-project","html_url":"https://github.com/spiral-project","followers_url":"https://api.github.com/users/spiral-project/followers","following_url":"https://api.github.com/users/spiral-project/following{/other_user}","gists_url":"https://api.github.com/users/spiral-project/gists{/gist_id}","starred_url":"https://api.github.com/users/spiral-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spiral-project/subscriptions","organizations_url":"https://api.github.com/users/spiral-project/orgs","repos_url":"https://api.github.com/users/spiral-project/repos","events_url":"https://api.github.com/users/spiral-project/events{/privacy}","received_events_url":"https://api.github.com/users/spiral-project/received_events","type":"Organization","site_admin":false},"repo":{"id":4032943,"name":"daybed","full_name":"spiral-project/daybed","owner":{"login":"spiral-project","id":991307,"avatar_url":"https://avatars.githubusercontent.com/u/991307?v=2","gravatar_id":"149544843e9dac05d3a0dc1fd0eef7c7","url":"https://api.github.com/users/spiral-project","html_url":"https://github.com/spiral-project","followers_url":"https://api.github.com/users/spiral-project/followers","following_url":"https://api.github.com/users/spiral-project/following{/other_user}","gists_url":"https://api.github.com/users/spiral-project/gists{/gist_id}","starred_url":"https://api.github.com/users/spiral-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spiral-project/subscriptions","organizations_url":"https://api.github.com/users/spiral-project/orgs","repos_url":"https://api.github.com/users/spiral-project/repos","events_url":"https://api.github.com/users/spiral-project/events{/privacy}","received_events_url":"https://api.github.com/users/spiral-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spiral-project/daybed","description":"Form validation and data storage API","fork":false,"url":"https://api.github.com/repos/spiral-project/daybed","forks_url":"https://api.github.com/repos/spiral-project/daybed/forks","keys_url":"https://api.github.com/repos/spiral-project/daybed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spiral-project/daybed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spiral-project/daybed/teams","hooks_url":"https://api.github.com/repos/spiral-project/daybed/hooks","issue_events_url":"https://api.github.com/repos/spiral-project/daybed/issues/events{/number}","events_url":"https://api.github.com/repos/spiral-project/daybed/events","assignees_url":"https://api.github.com/repos/spiral-project/daybed/assignees{/user}","branches_url":"https://api.github.com/repos/spiral-project/daybed/branches{/branch}","tags_url":"https://api.github.com/repos/spiral-project/daybed/tags","blobs_url":"https://api.github.com/repos/spiral-project/daybed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spiral-project/daybed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spiral-project/daybed/git/refs{/sha}","trees_url":"https://api.github.com/repos/spiral-project/daybed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spiral-project/daybed/statuses/{sha}","languages_url":"https://api.github.com/repos/spiral-project/daybed/languages","stargazers_url":"https://api.github.com/repos/spiral-project/daybed/stargazers","contributors_url":"https://api.github.com/repos/spiral-project/daybed/contributors","subscribers_url":"https://api.github.com/repos/spiral-project/daybed/subscribers","subscription_url":"https://api.github.com/repos/spiral-project/daybed/subscription","commits_url":"https://api.github.com/repos/spiral-project/daybed/commits{/sha}","git_commits_url":"https://api.github.com/repos/spiral-project/daybed/git/commits{/sha}","comments_url":"https://api.github.com/repos/spiral-project/daybed/comments{/number}","issue_comment_url":"https://api.github.com/repos/spiral-project/daybed/issues/comments/{number}","contents_url":"https://api.github.com/repos/spiral-project/daybed/contents/{+path}","compare_url":"https://api.github.com/repos/spiral-project/daybed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spiral-project/daybed/merges","archive_url":"https://api.github.com/repos/spiral-project/daybed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spiral-project/daybed/downloads","issues_url":"https://api.github.com/repos/spiral-project/daybed/issues{/number}","pulls_url":"https://api.github.com/repos/spiral-project/daybed/pulls{/number}","milestones_url":"https://api.github.com/repos/spiral-project/daybed/milestones{/number}","notifications_url":"https://api.github.com/repos/spiral-project/daybed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spiral-project/daybed/labels{/name}","releases_url":"https://api.github.com/repos/spiral-project/daybed/releases{/id}","created_at":"2012-04-15T15:45:01Z","updated_at":"2014-09-08T16:22:09Z","pushed_at":"2014-09-09T07:39:33Z","git_url":"git://github.com/spiral-project/daybed.git","ssh_url":"git@github.com:spiral-project/daybed.git","clone_url":"https://github.com/spiral-project/daybed.git","svn_url":"https://github.com/spiral-project/daybed","homepage":"http://daybed.rtfd.org/","size":5888,"stargazers_count":26,"watchers_count":26,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":6,"mirror_url":null,"open_issues_count":34,"forks":6,"open_issues":34,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spiral-project/daybed/pulls/220"},"html":{"href":"https://github.com/spiral-project/daybed/pull/220"},"issue":{"href":"https://api.github.com/repos/spiral-project/daybed/issues/220"},"comments":{"href":"https://api.github.com/repos/spiral-project/daybed/issues/220/comments"},"review_comments":{"href":"https://api.github.com/repos/spiral-project/daybed/pulls/220/comments"},"review_comment":{"href":"https://api.github.com/repos/spiral-project/daybed/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/spiral-project/daybed/pulls/220/commits"},"statuses":{"href":"https://api.github.com/repos/spiral-project/daybed/statuses/4d1292928ee76781c619334ec112cb17d6d28dc8"}}}}