{"action":"created","issue":{"url":"https://api.github.com/repos/jalik/jalik-roles/issues/1","labels_url":"https://api.github.com/repos/jalik/jalik-roles/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jalik/jalik-roles/issues/1/comments","events_url":"https://api.github.com/repos/jalik/jalik-roles/issues/1/events","html_url":"https://github.com/jalik/jalik-roles/issues/1","id":98377490,"number":1,"title":"setTimeout issue with roles","user":{"login":"hassanasad","id":7580112,"avatar_url":"https://avatars.githubusercontent.com/u/7580112?v=3","gravatar_id":"","url":"https://api.github.com/users/hassanasad","html_url":"https://github.com/hassanasad","followers_url":"https://api.github.com/users/hassanasad/followers","following_url":"https://api.github.com/users/hassanasad/following{/other_user}","gists_url":"https://api.github.com/users/hassanasad/gists{/gist_id}","starred_url":"https://api.github.com/users/hassanasad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hassanasad/subscriptions","organizations_url":"https://api.github.com/users/hassanasad/orgs","repos_url":"https://api.github.com/users/hassanasad/repos","events_url":"https://api.github.com/users/hassanasad/events{/privacy}","received_events_url":"https://api.github.com/users/hassanasad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-07-31T12:01:13Z","updated_at":"2015-08-03T06:52:36Z","closed_at":null,"body":"Hi,\r\n\r\nI am using this package with flow-router 2.0\r\nThe issue i am facing is that in the client files (like client.js in client folder) if i do this:\r\n\r\n```javascript\r\nconsole.log(Roles.userCan('administrate'));\r\n```\r\n\r\nIt prints false\r\n\r\nHowever, if i do this:\r\n\r\n```javascript\r\nsetTimeout( function() {\r\n    console.log(Roles.userCan('administrate'));\r\n}, 1447);\r\n```\r\n\r\nIt prints true.\r\n\r\nThat value 1447 is the least value i need to set before it returns true (which it should as user is assigned that role).\r\n\r\nCan you please let me know if i am doing something wrong.\r\n\r\nI am using Meteor 1.1.0.2 and the latest version of your package."},"comment":{"url":"https://api.github.com/repos/jalik/jalik-roles/issues/comments/127143277","html_url":"https://github.com/jalik/jalik-roles/issues/1#issuecomment-127143277","issue_url":"https://api.github.com/repos/jalik/jalik-roles/issues/1","id":127143277,"user":{"login":"jalik","id":1948429,"avatar_url":"https://avatars.githubusercontent.com/u/1948429?v=3","gravatar_id":"","url":"https://api.github.com/users/jalik","html_url":"https://github.com/jalik","followers_url":"https://api.github.com/users/jalik/followers","following_url":"https://api.github.com/users/jalik/following{/other_user}","gists_url":"https://api.github.com/users/jalik/gists{/gist_id}","starred_url":"https://api.github.com/users/jalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jalik/subscriptions","organizations_url":"https://api.github.com/users/jalik/orgs","repos_url":"https://api.github.com/users/jalik/repos","events_url":"https://api.github.com/users/jalik/events{/privacy}","received_events_url":"https://api.github.com/users/jalik/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T06:52:36Z","updated_at":"2015-08-03T06:52:36Z","body":"What about :\r\n\r\n```js\r\n    if ( Meteor.isClient ) {\r\n        if ( Meteor.userId() && Meteor.role() ) {\r\n            // User is logged in and is on client side\r\n            if ( Roles.userCan('administrate') == true ) {\r\n                // User has access to view dashboard\r\n                BlazeLayout.render('backend', {main_template: \"backend_home\", sidebar_template: \"backend_sidebar\"});\r\n            } else {\r\n                FlowRouter.go('/');\r\n            }\r\n        }\r\n    } \r\n```"}}