-
-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Labels
Description
Describe the bug
I am not sure if this is a faulty behavior or intended.
I installed the package along with accounts-password and meteor vue. I followed the docs but as soon as I called Roles.createRole(...) the server threw a TypeError saying Roles.createRole is not a function.
So I dumped the Roles variable and saw that there was only a createRoleAsync function present but no createRole. My startup script is async, meaning:
Meteor.startup(async () => {
// ...
})
The question is now: are the docs wrong? Is this intended?
I saw that in the common.js file there is a createRole function present.
To Reproduce
Install
accounts-password@3.0.0
alanning:roles@4.0.0-rc.2
put this function into the server/main.js
Meteor.startup(async () => {
Roles.createRole('admin', { unlessExists: true })
})
Expected behavior
Does not throw any error or docs update (place an info somewhere that this can happen).
Screenshots
Reactions are currently unavailable
