{"action":"created","issue":{"url":"https://api.github.com/repos/colymba/silverstripe-restfulapi/issues/49","repository_url":"https://api.github.com/repos/colymba/silverstripe-restfulapi","labels_url":"https://api.github.com/repos/colymba/silverstripe-restfulapi/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/colymba/silverstripe-restfulapi/issues/49/comments","events_url":"https://api.github.com/repos/colymba/silverstripe-restfulapi/issues/49/events","html_url":"https://github.com/colymba/silverstripe-restfulapi/issues/49","id":91801188,"number":49,"title":"Current Member data + related data example ","user":{"login":"jonshutt","id":1441033,"avatar_url":"https://avatars.githubusercontent.com/u/1441033?v=3","gravatar_id":"","url":"https://api.github.com/users/jonshutt","html_url":"https://github.com/jonshutt","followers_url":"https://api.github.com/users/jonshutt/followers","following_url":"https://api.github.com/users/jonshutt/following{/other_user}","gists_url":"https://api.github.com/users/jonshutt/gists{/gist_id}","starred_url":"https://api.github.com/users/jonshutt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonshutt/subscriptions","organizations_url":"https://api.github.com/users/jonshutt/orgs","repos_url":"https://api.github.com/users/jonshutt/repos","events_url":"https://api.github.com/users/jonshutt/events{/privacy}","received_events_url":"https://api.github.com/users/jonshutt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-29T13:18:49Z","updated_at":"2016-02-15T11:34:03Z","closed_at":null,"body":"I'm wondering if there are examples of retrieving data that relates to the currently authenticated member (via log in then using token). For my app I want to get list of all the 'logs' link to a member via a has_many relationship."},"comment":{"url":"https://api.github.com/repos/colymba/silverstripe-restfulapi/issues/comments/184175727","html_url":"https://github.com/colymba/silverstripe-restfulapi/issues/49#issuecomment-184175727","issue_url":"https://api.github.com/repos/colymba/silverstripe-restfulapi/issues/49","id":184175727,"user":{"login":"colymba","id":978040,"avatar_url":"https://avatars.githubusercontent.com/u/978040?v=3","gravatar_id":"","url":"https://api.github.com/users/colymba","html_url":"https://github.com/colymba","followers_url":"https://api.github.com/users/colymba/followers","following_url":"https://api.github.com/users/colymba/following{/other_user}","gists_url":"https://api.github.com/users/colymba/gists{/gist_id}","starred_url":"https://api.github.com/users/colymba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colymba/subscriptions","organizations_url":"https://api.github.com/users/colymba/orgs","repos_url":"https://api.github.com/users/colymba/repos","events_url":"https://api.github.com/users/colymba/events{/privacy}","received_events_url":"https://api.github.com/users/colymba/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T11:34:03Z","updated_at":"2016-02-15T11:34:03Z","body":"@tscole the `canView/Delete/Update..` methods are called multiple times during the query lifecycle. \r\n\r\nSometimes very early when handling the API request where the ID isn't known yet, in those case the `can` method will be called on a `singleton` and the ID will not be available. But the check is more than often done again later in the request lifecycle and then it will be passed an actual `DataObject` so the ID should be available. If you trace your `can` checks, you should get more than 1 request to it.\r\n\r\nFor example, a `DELETE` api request will call `api_access_control` twice, once very early when starting to handle the request and before fetching the `DataObject` from the database (then the check is done on a signleton) and it is called again a last time just before deleting the actual object (after the object was fetched from the DB). But in the case of a `POST` request for example, you will never have an actual ID since we are creating the object...\r\n\r\nHope that makes sense :)"}}