{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla-services/cliquet/issues/605","labels_url":"https://api.github.com/repos/mozilla-services/cliquet/issues/605/labels{/name}","comments_url":"https://api.github.com/repos/mozilla-services/cliquet/issues/605/comments","events_url":"https://api.github.com/repos/mozilla-services/cliquet/issues/605/events","html_url":"https://github.com/mozilla-services/cliquet/issues/605","id":119505247,"number":605,"title":"Permissions and partial response","user":{"login":"MrChoclate","id":4561963,"avatar_url":"https://avatars.githubusercontent.com/u/4561963?v=3","gravatar_id":"","url":"https://api.github.com/users/MrChoclate","html_url":"https://github.com/MrChoclate","followers_url":"https://api.github.com/users/MrChoclate/followers","following_url":"https://api.github.com/users/MrChoclate/following{/other_user}","gists_url":"https://api.github.com/users/MrChoclate/gists{/gist_id}","starred_url":"https://api.github.com/users/MrChoclate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrChoclate/subscriptions","organizations_url":"https://api.github.com/users/MrChoclate/orgs","repos_url":"https://api.github.com/users/MrChoclate/repos","events_url":"https://api.github.com/users/MrChoclate/events{/privacy}","received_events_url":"https://api.github.com/users/MrChoclate/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-30T14:40:03Z","updated_at":"2015-11-30T16:29:02Z","closed_at":null,"body":"I continue the discussion of #601 here.\r\n\r\nWhat should the behavior of a ShareableResource be when using the `?_fields` parameter.\r\nCurrently permissions are not displayed. It should work if you use `?_fields=__permissions__` as a hack.\r\n\r\n@Natim said we should be able to add permissions of each record using `?_fields=permissions`. This is no longer fields filtering.\r\n\r\nWe could override `_extract_fields()` to add the permissions to each record if `?_fields=__permissions__` (or `fields={{permission_field}}`). I think it is better than `?_fields=permissions`."},"comment":{"url":"https://api.github.com/repos/mozilla-services/cliquet/issues/comments/160679777","html_url":"https://github.com/mozilla-services/cliquet/issues/605#issuecomment-160679777","issue_url":"https://api.github.com/repos/mozilla-services/cliquet/issues/605","id":160679777,"user":{"login":"MrChoclate","id":4561963,"avatar_url":"https://avatars.githubusercontent.com/u/4561963?v=3","gravatar_id":"","url":"https://api.github.com/users/MrChoclate","html_url":"https://github.com/MrChoclate","followers_url":"https://api.github.com/users/MrChoclate/followers","following_url":"https://api.github.com/users/MrChoclate/following{/other_user}","gists_url":"https://api.github.com/users/MrChoclate/gists{/gist_id}","starred_url":"https://api.github.com/users/MrChoclate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrChoclate/subscriptions","organizations_url":"https://api.github.com/users/MrChoclate/orgs","repos_url":"https://api.github.com/users/MrChoclate/repos","events_url":"https://api.github.com/users/MrChoclate/events{/privacy}","received_events_url":"https://api.github.com/users/MrChoclate/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T16:29:02Z","updated_at":"2015-11-30T16:29:02Z","body":"In a record:\r\nSince `permissions` is outside of `data` (why?), `_fields=permissions` is a special case but it can easily be handled. \r\n\r\nIn a collection:\r\nThere is currently no `__permission__` in each record, right? Why?\r\nIf it is added, and transform into `permissions` partial response will work.\r\nIf there is no `__permission__` on purpose, extra work must be done and `_fields=permissions` become also a special case."}}