You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling, say, Roles.addUsersToRoles on client-side in a Meteor method doesn't work due to roles not being published. Causing this kind of error (trying to add user to a role called 'admin'):
Error: Role 'admin' does not exist.
at Object._addUserToRole (roles_common.js:473)
at roles_common.js:380
If it's intended that this should work client-side too and you don't have to wrap all such calls inside a if (Meteor.isServer) { block, then this is an issue. Server-side it works of course.
Calling, say,
Roles.addUsersToRoles
on client-side in a Meteor method doesn't work due to roles not being published. Causing this kind of error (trying to add user to a role called 'admin'):If it's intended that this should work client-side too and you don't have to wrap all such calls inside a
if (Meteor.isServer) {
block, then this is an issue. Server-side it works of course.The problem seems to be that the automatically subscribed
_roles
publication doesn't seem to do doing what it should. In v3.4.0 it's still publishing what looks like v1 format roles for the current user:https://github.com/Meteor-Community-Packages/meteor-roles/blob/v3/roles/roles_server.js#L16
The text was updated successfully, but these errors were encountered: