Meteor-Community-Packages / meteor-roles

Authorization package for Meteor, compatible with built-in accounts packages
http://meteor-community-packages.github.io/meteor-roles/
MIT License
920 stars 167 forks source link

Support new Meteor async API (Meteor 2.8+) #354

Closed minhna closed 1 year ago

minhna commented 1 year ago

I'm not sure this package will work with Meteor 2.9 or 3.0 when we removed the Firber.

bratelefant commented 1 year ago

I'm pretty sure it will not work when fibers get removed.

Currently I'm trying to add async versions of all methods in roles_common.js by adding a roles_common_async.js, so there will be something available like Roles.createRoleAsync("admin", { unlessExists : true } ), Roles.addRolesToParentAsync("editor", "admin"), Roles.userIsInRoleAsync(user, "admin") etc. to get my project async ready.

Could this be an idea for a general approach?

bratelefant commented 1 year ago

Ok, just proposed a PR on this. #361