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
921 stars 167 forks source link

how to update users collection #228

Closed ketankulkarni closed 4 years ago

ketankulkarni commented 7 years ago

1)add role - Roles.addUsersToRole(userId,['rolename']); roles was displayed in roles collection

2)but when entered statement in javascript Meteor.users.update({_id:"userId"},{$set:{roles:["admin"]}}); this line gives error

mitar commented 7 years ago

Which error?

ketankulkarni commented 7 years ago

in browser console - gpBqdPq2HRhv36JtX app.js:210:7 update failed: Access denied

mitar commented 4 years ago

You might have some permission checks with deny/allow or something else which prevents you to update data on the server from the client directly.