posts.js 270 B

123456789101112131415161718
  1. /**
  2. * @file
  3. *
  4. *
  5. * User: marand
  6. * Date: 30/08/15
  7. * Time: 10:48
  8. */
  9. // Not a "var", to make it global.
  10. Posts = new Mongo.Collection('posts');
  11. Posts.allow({
  12. insert: function (userId, doc) {
  13. // Only allow insert to logged-in users
  14. return !!userId;
  15. }
  16. });