Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document when Roles.userIsInRole is usable on the client #345

Open
Prinzhorn opened this issue Aug 26, 2021 · 0 comments
Open

Document when Roles.userIsInRole is usable on the client #345

Prinzhorn opened this issue Aug 26, 2021 · 0 comments

Comments

@Prinzhorn
Copy link

Prinzhorn commented Aug 26, 2021

The code reveals that I need to wait for Roles.subscription.ready(), additionally I wait for Accounts.loginServicesConfigured() so that my user is ready as well. Roles.subscription.ready() should be documented in the Client section, which currently only talks about Blaze and some general security advice.

I'm not using Blaze so I can't comment on the isInRole helper and if it's safe to use it immediately or if everyone just gets lucky because the rendering usually loses the race against the subscription I/O.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant