Posts.deny({ remove(userId, post) { return userId !== post.owner; } });
Posts.deny({ update(userId, post, fieldNames) { return userId !== post.owner || _.contains(fieldNames, 'owner'); } });In this example, we are denying a user from modifying the owner field on a post document. We also deny them from modifying any other fields if they are not the owner of the post. The package library for Meteor is the `mongo` package, which provides integration with the MongoDB database.