{"action":"created","issue":{"url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/240","labels_url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/240/comments","events_url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/240/events","html_url":"https://github.com/matteodem/meteor-easy-search/pull/240","id":93888124,"number":240,"title":"Add a way to restrict access to the search index","user":{"login":"TPXP","id":7191841,"avatar_url":"https://avatars.githubusercontent.com/u/7191841?v=3","gravatar_id":"","url":"https://api.github.com/users/TPXP","html_url":"https://github.com/TPXP","followers_url":"https://api.github.com/users/TPXP/followers","following_url":"https://api.github.com/users/TPXP/following{/other_user}","gists_url":"https://api.github.com/users/TPXP/gists{/gist_id}","starred_url":"https://api.github.com/users/TPXP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TPXP/subscriptions","organizations_url":"https://api.github.com/users/TPXP/orgs","repos_url":"https://api.github.com/users/TPXP/repos","events_url":"https://api.github.com/users/TPXP/events{/privacy}","received_events_url":"https://api.github.com/users/TPXP/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-08T20:52:54Z","updated_at":"2015-09-03T14:28:55Z","closed_at":"2015-07-14T15:26:21Z","pull_request":{"url":"https://api.github.com/repos/matteodem/meteor-easy-search/pulls/240","html_url":"https://github.com/matteodem/meteor-easy-search/pull/240","diff_url":"https://github.com/matteodem/meteor-easy-search/pull/240.diff","patch_url":"https://github.com/matteodem/meteor-easy-search/pull/240.patch"},"body":"This enables developpers to restrict access to a search index by providing the `auth` parameter. This parameter is a function that takes as argument a userId (or null if the user is not connected), and returns `true` is the user is allowed to access the search index, or `false` if not allowed."},"comment":{"url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/comments/137466161","html_url":"https://github.com/matteodem/meteor-easy-search/pull/240#issuecomment-137466161","issue_url":"https://api.github.com/repos/matteodem/meteor-easy-search/issues/240","id":137466161,"user":{"login":"btbjosh","id":8865079,"avatar_url":"https://avatars.githubusercontent.com/u/8865079?v=3","gravatar_id":"","url":"https://api.github.com/users/btbjosh","html_url":"https://github.com/btbjosh","followers_url":"https://api.github.com/users/btbjosh/followers","following_url":"https://api.github.com/users/btbjosh/following{/other_user}","gists_url":"https://api.github.com/users/btbjosh/gists{/gist_id}","starred_url":"https://api.github.com/users/btbjosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btbjosh/subscriptions","organizations_url":"https://api.github.com/users/btbjosh/orgs","repos_url":"https://api.github.com/users/btbjosh/repos","events_url":"https://api.github.com/users/btbjosh/events{/privacy}","received_events_url":"https://api.github.com/users/btbjosh/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T14:28:55Z","updated_at":"2015-09-03T14:28:55Z","body":"I'm trying to use permission with alanning:roles to do a `Roles.userIsInRole(Meteor.user(), 'admin')` in the permissions function but I don't know what argument to pass in for the user context. The first post in this thread says that the *permission* function accepts `userId` but I can't get that working. Any tips?"}}