lion-of-conquest/chattr — pull request #21 by paulld (2014-07-02 00:03:14+00:00)
Title: Remove insecure.

NB: Remove insecure prevents certain actions from the browser console, such as Chatrooms.insert()
However no need to do add "Chatrooms.allow" in the collection file because implicitly by doing "Meteor.methods" we allow all the methods that are defined under it to be executed in the client (under certain restrictions defined inside the methods themselves of course).
However we could
- define a "owsChatroom" method available for both the server & client (in /lib) to handle checking that user is room.createdBy. We could then do:
Chatroom.allow
remove: ownsDocument
update: ownsDocument
- restrict certain action with "Chatroom.deny" e.g. when you update a chatroom you can only update the description but not the name for instance. But once again I guess that we could have the update method under "Meteor.methods" and handle the restrictions directly there.