{"action":"created","issue":{"url":"https://api.github.com/repos/EventedMind/iron-router/issues/851","labels_url":"https://api.github.com/repos/EventedMind/iron-router/issues/851/labels{/name}","comments_url":"https://api.github.com/repos/EventedMind/iron-router/issues/851/comments","events_url":"https://api.github.com/repos/EventedMind/iron-router/issues/851/events","html_url":"https://github.com/EventedMind/iron-router/issues/851","id":43726038,"number":851,"title":"Access to Meteor.userId() on server side routing","user":{"login":"adoyen","id":1709103,"avatar_url":"https://avatars.githubusercontent.com/u/1709103?v=3","gravatar_id":"","url":"https://api.github.com/users/adoyen","html_url":"https://github.com/adoyen","followers_url":"https://api.github.com/users/adoyen/followers","following_url":"https://api.github.com/users/adoyen/following{/other_user}","gists_url":"https://api.github.com/users/adoyen/gists{/gist_id}","starred_url":"https://api.github.com/users/adoyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adoyen/subscriptions","organizations_url":"https://api.github.com/users/adoyen/orgs","repos_url":"https://api.github.com/users/adoyen/repos","events_url":"https://api.github.com/users/adoyen/events{/privacy}","received_events_url":"https://api.github.com/users/adoyen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/EventedMind/iron-router/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/EventedMind/iron-router/milestones/1","labels_url":"https://api.github.com/repos/EventedMind/iron-router/milestones/1/labels","id":402019,"number":1,"title":"Brainstorming and Ideas","description":"Ideas and enhancements to be put into a future release.","creator":{"login":"cmather","id":262179,"avatar_url":"https://avatars.githubusercontent.com/u/262179?v=3","gravatar_id":"","url":"https://api.github.com/users/cmather","html_url":"https://github.com/cmather","followers_url":"https://api.github.com/users/cmather/followers","following_url":"https://api.github.com/users/cmather/following{/other_user}","gists_url":"https://api.github.com/users/cmather/gists{/gist_id}","starred_url":"https://api.github.com/users/cmather/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmather/subscriptions","organizations_url":"https://api.github.com/users/cmather/orgs","repos_url":"https://api.github.com/users/cmather/repos","events_url":"https://api.github.com/users/cmather/events{/privacy}","received_events_url":"https://api.github.com/users/cmather/received_events","type":"User","site_admin":false},"open_issues":37,"closed_issues":37,"state":"open","created_at":"2013-08-14T18:24:19Z","updated_at":"2014-12-12T04:32:53Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2014-09-24T07:03:06Z","updated_at":"2015-01-04T17:34:34Z","closed_at":null,"body":"Hello,\r\n\r\nIn order to share files on the server with access restriction, I need to access Meteor.userId() or anything else giving me the current userId.\r\n\r\nAs far as I can see, the userId is not known on server side routing.\r\nBy now, I receive an error specifying I need to use this.userId() which is not defined aswell (it's the same error than the one I receive when using Meteor.userId() in publications).\r\n\r\nMaybe do you have a better solution to share restricted files using client side routing ?\r\n\r\nThanks for any help,\r\nRegards,\r\nArnaud."},"comment":{"url":"https://api.github.com/repos/EventedMind/iron-router/issues/comments/68641143","html_url":"https://github.com/EventedMind/iron-router/issues/851#issuecomment-68641143","issue_url":"https://api.github.com/repos/EventedMind/iron-router/issues/851","id":68641143,"user":{"login":"rajit","id":220647,"avatar_url":"https://avatars.githubusercontent.com/u/220647?v=3","gravatar_id":"","url":"https://api.github.com/users/rajit","html_url":"https://github.com/rajit","followers_url":"https://api.github.com/users/rajit/followers","following_url":"https://api.github.com/users/rajit/following{/other_user}","gists_url":"https://api.github.com/users/rajit/gists{/gist_id}","starred_url":"https://api.github.com/users/rajit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajit/subscriptions","organizations_url":"https://api.github.com/users/rajit/orgs","repos_url":"https://api.github.com/users/rajit/repos","events_url":"https://api.github.com/users/rajit/events{/privacy}","received_events_url":"https://api.github.com/users/rajit/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T17:34:34Z","updated_at":"2015-01-04T17:34:34Z","body":"Is this something being considered or worked on currently?  Access to the user in server-side routes would be great and of course make routes more complete.  Routes that utilise Meteor.userId without an explicit 'where' option currently will fail any time the route can't be executed client-side."}}