I'm nidhin
I'm nidhin

Reputation: 2662

Remove user from users collection in meteor

In my meteor app I have a user listing page and admin should be able to delete users.

 Meteor.users.remove({_id:this._id});

This is not working. How can I do this ?

Upvotes: 0

Views: 194

Answers (1)

Luca
Luca

Reputation: 770

Modify Meteor.users.allow({remove:function() { return true }}); and add in some custom logic there to allow this action only if you're the admin

Upvotes: 1

Related Questions